import 'dart:math' as math;

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'flex_color_scheme.dart';
import 'flex_constants.dart';
import 'flex_extensions.dart';
import 'flex_sub_themes_data.dart';

part 'flex_sub_themes/flex_sub_themes_app_bar.dart';
part 'flex_sub_themes/flex_sub_themes_bottom_app_bar.dart';
part 'flex_sub_themes/flex_sub_themes_bottom_navigation_bar.dart';
part 'flex_sub_themes/flex_sub_themes_bottom_sheet.dart';
part 'flex_sub_themes/flex_sub_themes_button.dart';
part 'flex_sub_themes/flex_sub_themes_card.dart';
part 'flex_sub_themes/flex_sub_themes_checkbox.dart';
part 'flex_sub_themes/flex_sub_themes_chip.dart';
part 'flex_sub_themes/flex_sub_themes_date_picker.dart';
part 'flex_sub_themes/flex_sub_themes_dialog.dart';
part 'flex_sub_themes/flex_sub_themes_drawer.dart';
part 'flex_sub_themes/flex_sub_themes_dropdown_menu.dart';
part 'flex_sub_themes/flex_sub_themes_elevated_button.dart';
part 'flex_sub_themes/flex_sub_themes_filled_button.dart';
part 'flex_sub_themes/flex_sub_themes_floating_action_button.dart';
part 'flex_sub_themes/flex_sub_themes_icon_button.dart';
part 'flex_sub_themes/flex_sub_themes_input_decoration.dart';
part 'flex_sub_themes/flex_sub_themes_list_tile.dart';
part 'flex_sub_themes/flex_sub_themes_menu.dart';
part 'flex_sub_themes/flex_sub_themes_menu_bar.dart';
part 'flex_sub_themes/flex_sub_themes_menu_button.dart';
part 'flex_sub_themes/flex_sub_themes_navigation_bar.dart';
part 'flex_sub_themes/flex_sub_themes_navigation_drawer.dart';
part 'flex_sub_themes/flex_sub_themes_navigation_rail.dart';
part 'flex_sub_themes/flex_sub_themes_outlined_button.dart';
part 'flex_sub_themes/flex_sub_themes_popup_menu.dart';
part 'flex_sub_themes/flex_sub_themes_progress_indicator.dart';
part 'flex_sub_themes/flex_sub_themes_radio.dart';
part 'flex_sub_themes/flex_sub_themes_search_bar.dart';
part 'flex_sub_themes/flex_sub_themes_search_view.dart';
part 'flex_sub_themes/flex_sub_themes_segmented_button.dart';
part 'flex_sub_themes/flex_sub_themes_slider.dart';
part 'flex_sub_themes/flex_sub_themes_snack_bar.dart';
part 'flex_sub_themes/flex_sub_themes_switch.dart';
part 'flex_sub_themes/flex_sub_themes_tab_bar.dart';
part 'flex_sub_themes/flex_sub_themes_text_button.dart';
part 'flex_sub_themes/flex_sub_themes_text_selection.dart';
part 'flex_sub_themes/flex_sub_themes_time_picker.dart';
part 'flex_sub_themes/flex_sub_themes_toggle_buttons.dart';
part 'flex_sub_themes/flex_sub_themes_tooltip.dart';

/// Enum used to select the type of border used on by the input decorator in
/// [FlexSubThemes.inputDecorationTheme].
enum FlexInputBorderType {
  /// Used to select [OutlineInputBorder] as input decorator in
  /// [FlexSubThemes.inputDecorationTheme].
  outline,

  /// Used to select [UnderlineInputBorder] as input decorator in
  /// [FlexSubThemes.inputDecorationTheme].
  underline,
}

/// Enum used to described which color from the active theme's 46
/// [ColorScheme] colors, should be used for by color properties available in
/// component sub-themes.
///
/// Used when opting in on component themes. The opinionated component themes
/// typically have one or more properties called `nnnSchemeColor`. Where
/// `nnn` describes the color feature that can be set to a none default
/// [ColorScheme] based color.
///
/// If not set, the property is null and the default [ColorScheme] based
/// color behavior of the opinionated component theme will be used. This may
/// differ from the corresponding Widget's SDK default un-themed color behavior,
/// but is often the same if defined at all.
///
/// The [SchemeColor] also includes options for black, white and
/// transparent colors, they may sometimes be useful in sub-themes.
///
/// Colors that have been deprecated in Flutter's [ColorScheme] but not yet
/// removed in the stable channel are already excluded here.
enum SchemeColor {
  /// The active theme's color scheme primary color will be used.
  primary,

  /// The active theme's color scheme  onPrimary color will be used.
  onPrimary,

  /// The active theme's color scheme primaryContainer color will be used.
  primaryContainer,

  /// The active theme's color scheme onPrimaryContainer color will be used.
  onPrimaryContainer,

  /// The active theme's color scheme primaryFixed color will be used.
  primaryFixed,

  /// The active theme's color scheme primaryFixedDim color will be used.
  primaryFixedDim,

  /// The active theme's color scheme onPrimaryFixed color will be used.
  onPrimaryFixed,

  /// The active theme's color scheme onPrimaryFixedVariant color will be used.
  onPrimaryFixedVariant,

  /// The active theme's color scheme secondary color will be used.
  secondary,

  /// The active theme's color scheme onSecondary color will be used.
  onSecondary,

  /// The active theme's color scheme secondaryContainer color will be used.
  secondaryContainer,

  /// The active theme's color scheme onSecondaryContainer color will be used.
  onSecondaryContainer,

  /// The active theme's color scheme secondaryFixed color will be used.
  secondaryFixed,

  /// The active theme's color scheme secondaryFixedDim color will be used.
  secondaryFixedDim,

  /// The active theme's color scheme onSecondaryFixed color will be used.
  onSecondaryFixed,

  /// The active theme's color scheme onSecondaryFixedVariant color will
  /// be used.
  onSecondaryFixedVariant,

  /// The active theme's color scheme tertiary color will be used.
  tertiary,

  /// The active theme's color scheme onTertiary color will be used.
  onTertiary,

  /// The active theme's color scheme tertiaryContainer color will be used.
  tertiaryContainer,

  /// The active theme's color scheme onTertiaryContainer color will be used.
  onTertiaryContainer,

  /// The active theme's color scheme tertiaryFixed color will be used.
  tertiaryFixed,

  /// The active theme's color scheme tertiaryFixedDim color will be used.
  tertiaryFixedDim,

  /// The active theme's color scheme onTertiaryFixed color will be used.
  onTertiaryFixed,

  /// The active theme's color scheme onTertiaryFixedVariant color will be used.
  onTertiaryFixedVariant,

  /// The active theme's color scheme error color will be used.
  error,

  /// The active theme's color scheme onError color will be used.
  onError,

  /// The active theme's color scheme errorContainer color will be used.
  errorContainer,

  /// The active theme's color scheme onErrorContainer color will be used.
  onErrorContainer,

  /// The active theme's color scheme surface color will be used.
  surface,

  /// The active theme's color scheme  onSurface color will be used.
  onSurface,

  /// The active theme's color scheme surfaceDim color will be used.
  surfaceDim,

  /// The active theme's color scheme surfaceBright color will be used.
  surfaceBright,

  /// The active theme's color scheme surfaceContainerLowest color will be used.
  surfaceContainerLowest,

  /// The active theme's color scheme surfaceContainerLow color will be used.
  surfaceContainerLow,

  /// The active theme's color scheme surfaceContainer color will be used.
  surfaceContainer,

  /// The active theme's color scheme surfaceContainerHigh color will be used.
  surfaceContainerHigh,

  /// The active theme's color scheme surfaceContainerHighest color will
  /// be used.
  surfaceContainerHighest,

  /// The active theme's color scheme onSurfaceVariant color will be used.
  onSurfaceVariant,

  /// The active theme's color scheme outline color will be used.
  outline,

  /// The active theme's color scheme outlineVariant color will be used.
  outlineVariant,

  /// The active theme's color scheme shadow color will be used.
  shadow,

  /// The active theme's color scheme scrim color will be used.
  scrim,

  /// The active theme's color scheme inverseSurface color will be used.
  inverseSurface,

  /// The active theme's color scheme onInverseSurface color will be used.
  onInverseSurface,

  /// The active theme's color scheme inversePrimary color will be used.
  inversePrimary,

  /// The active theme's color scheme surfaceTint color will be used.
  surfaceTint,

  /// Black color will be used.
  black,

  /// White color will be used.
  white,

  /// Transparent color will be used.
  transparent,
}

/// Enum used to select the type of built-in value indicator used by [Slider].
///
/// The current two options included are Material-2 default
/// [RectangularSliderValueIndicatorShape] and Material-3 default
/// [DropSliderValueIndicatorShape].
///
/// The current implementation of the drop in Flutter, at least up and until
/// version 3.24, does not match the official Material-3 specification.
/// More options will be added when they are supported in Flutter.
///
/// This enum is used by [FlexSubThemes.sliderTheme].
enum FlexSliderIndicatorType {
  /// Used to select [RectangularSliderValueIndicatorShape] as value indicator
  /// in [FlexSubThemes.sliderTheme] for the [Slider] widget.
  /// For the [RangeSlider] the corresponding shape
  /// [RectangularRangeSliderValueIndicatorShape] is used.
  ///
  /// It is a rounded rectangle with talk bubble pointer to slider thumb.
  ///
  /// This is default style for the Material-2 specification and mode.
  rectangular,

  /// Used to select [DropSliderValueIndicatorShape] as value indicator
  /// in [FlexSubThemes.sliderTheme] for the [Slider] widget.
  /// For the [RangeSlider] the corresponding shape
  /// [PaddleRangeSliderValueIndicatorShape] is used. There is no old M3
  /// spec correct drop shape for RangeSlider in Flutter, this is used
  /// as the closest available alternative. This version was made before the
  /// correct M3 older shape was available. The correct shape for the older
  /// M3 shape was never implemented for RangeSlider in Flutter.
  ///
  /// It is a like an inverted water drop, or a map pin drop pointing
  /// towards the slider thumb.
  ///
  /// This is default style for the older Material-3 specification and mode.
  /// In Flutter SDK the range slider uses the rectangular shape by default
  /// in M3 mode, but FCS uses the [PaddleRangeSliderValueIndicatorShape]
  /// as default for the [RangeSlider] as it is closer to the older M3 spec
  /// than the rectangular shape.
  drop,

  /// Used to select the [RoundedRectSliderValueIndicatorShape] for the [Slider]
  /// value indicator in [FlexSubThemes.sliderTheme] for the [Slider] widget.
  /// For the [RangeSlider] the corresponding shape
  /// [RoundedRectRangeSliderValueIndicatorShape] is used.
  ///
  /// This is the default style
  /// for the newer Material-3 specification introduced in December 2023.
  rounded,
}

/// A class container with static sub-theme helper functions used by
/// component theming in [FlexColorScheme].
///
/// [FlexSubThemes] offers optional opinionated component theme helpers. You can
/// change many properties of the opt-in setup by defining custom
/// configuration values in the [FlexSubThemesData] configuration class,
/// and passing it to the [FlexColorScheme.subThemesData] property.
///
/// To enable the component sub-themes using default settings, pass a default
/// constructor `FlexSubThemesData()` to [FlexColorScheme.subThemesData].
///
/// The configuration class [FlexSubThemesData] offers easy to use configuration
/// properties for using these sub-themes in [FlexColorScheme].
///
/// It is also possible to use the [FlexSubThemes] static sub-theming helpers
/// without even using [FlexColorScheme] based theming.
///
/// The [FlexSubThemesData] configuration class does not use these static
/// helpers. It is [FlexColorScheme] that uses the [FlexSubThemesData] class
/// to configure the opt-in sub-themes, based on the setup information provided
/// via [FlexColorScheme.subThemesData], by passing properties defined in it, to
/// the sub-theme helpers below, that are then used to define the component
/// sub-themes for the produced [ThemeData].
///
/// These component theme helpers are currently available:
///
/// * [AppBarThemeData] for [AppBar] via [appBarTheme].
/// * [BottomAppBarThemeData] for [BottomAppBar] via [bottomAppBarTheme].
/// * [BottomNavigationBarThemeData] for [BottomNavigationBar] via
///   [bottomNavigationBarTheme].
/// * [BottomSheetThemeData] for [BottomSheet] via [bottomSheetTheme].
/// * [ButtonThemeData] for old deprecated buttons, via [buttonTheme].
/// * [CardThemeData] for [Card] via [cardTheme].
/// * [CheckboxThemeData] for [Checkbox] via [checkboxTheme].
/// * [ChipThemeData] for [Chip] via [chipTheme].
/// * [DatePickerThemeData] for [DatePickerDialog] via [datePickerTheme].
/// * [DialogThemeData] for [Dialog] via [dialogTheme].
/// * [DrawerThemeData] for [Drawer] via [drawerTheme].
/// * [DropdownMenuThemeData] for [DropdownMenu] via [dropdownMenuTheme].
/// * [ElevatedButtonThemeData] for [ElevatedButton] via [elevatedButtonTheme].
/// * [FilledButtonThemeData] for [FilledButton] via
///   [FlexSubThemes.filledButtonTheme].
/// * [FloatingActionButtonThemeData] for [FloatingActionButton] via
///   [floatingActionButtonTheme].
/// * [IconButtonThemeData] for [IconButton] via [iconButtonTheme].
/// * [InputDecorationThemeData] for [InputDecoration] via
///   [inputDecorationTheme].
/// * [ListTileThemeData] for [ListTile] via [listTileTheme].
/// * [MenuBarThemeData] for [MenuBar] via [menuBarTheme].
/// * [MenuButtonThemeData] for [MenuItemButton] and [SubmenuButton] via
///   [menuButtonTheme].
/// * [MenuThemeData] for [MenuBar], [MenuAnchor] and [DropdownMenu] via
///   [menuTheme].
/// * [NavigationBarThemeData] for [NavigationBar] via [navigationBarTheme].
/// * [NavigationDrawerThemeData] for [NavigationDrawer] via
///   [navigationDrawerTheme].
/// * [NavigationRailThemeData] for [NavigationRail] via [navigationRailTheme].
/// * [OutlinedButtonThemeData] for [OutlinedButton] via [outlinedButtonTheme].
/// * [PopupMenuThemeData] for [PopupMenuButton] via [popupMenuTheme].
/// * [ProgressIndicatorThemeData] for [CircularProgressIndicator] and
///   [LinearProgressIndicator] via [progressIndicatorTheme].
/// * [RadioThemeData] for [Radio] via [radioTheme].
/// * [SearchBarThemeData] for [SearchBar] via [searchBarTheme].
/// * [SearchViewThemeData] for [SearchBar] and its open view via
///   [searchViewTheme].
/// * [SegmentedButtonThemeData] for [SegmentedButton] via
///   [segmentedButtonTheme].
/// * [SliderThemeData] for [Slider] via [sliderTheme].
/// * [SnackBarThemeData] for [SnackBar] via [snackBarTheme].
/// * [SwitchThemeData] for [Switch] via [switchTheme].
/// * [TabBarThemeData] for [TabBar] via [tabBarTheme].
/// * [TextButtonThemeData] for [TextButton] via [textButtonTheme].
/// * [TextSelectionThemeData] for [TextField] via [textSelectionTheme].
/// * [TimePickerThemeData] for [TimePickerDialog] via [timePickerTheme].
/// * [ToggleButtonsThemeData] for [ToggleButtons] via [toggleButtonsTheme].
/// * [TooltipThemeData] for [Tooltip] via [tooltipTheme].
///
/// While it is possible to use these helpers without [FlexColorScheme] it may
/// not be ideal, as they are designed with the features used and needed by
/// [FlexColorScheme] and its configuration class [FlexSubThemesData] in mind.
///
/// The [FlexSubThemes] may have more frequent breaking changes than
/// [FlexColorScheme] and [FlexSubThemesData] as it is a more secondary level.
/// It was decided to keep their APIs public as the may also be useful for
/// other theming solutions.
abstract final class FlexSubThemes {
  /// Returns the [Color] from passed in [ColorScheme] in [colorScheme]
  /// corresponding to the [SchemeColor] enum selection in [value].
  ///
  /// This function is used to select a none default color available in the
  /// theme's [ColorScheme] in opinionated sub-themes. While still intentionally
  /// restricting the selection to only colors available in the active
  /// theme's [ColorScheme].
  static Color schemeColor(SchemeColor value, ColorScheme colorScheme) {
    return switch (value) {
      SchemeColor.primary => colorScheme.primary,
      SchemeColor.onPrimary => colorScheme.onPrimary,
      SchemeColor.primaryContainer => colorScheme.primaryContainer,
      SchemeColor.onPrimaryContainer => colorScheme.onPrimaryContainer,
      SchemeColor.primaryFixed => colorScheme.primaryFixed,
      SchemeColor.primaryFixedDim => colorScheme.primaryFixedDim,
      SchemeColor.onPrimaryFixed => colorScheme.onPrimaryFixed,
      SchemeColor.onPrimaryFixedVariant => colorScheme.onPrimaryFixedVariant,
      SchemeColor.secondary => colorScheme.secondary,
      SchemeColor.onSecondary => colorScheme.onSecondary,
      SchemeColor.secondaryContainer => colorScheme.secondaryContainer,
      SchemeColor.onSecondaryContainer => colorScheme.onSecondaryContainer,
      SchemeColor.secondaryFixed => colorScheme.secondaryFixed,
      SchemeColor.secondaryFixedDim => colorScheme.secondaryFixedDim,
      SchemeColor.onSecondaryFixed => colorScheme.onSecondaryFixed,
      SchemeColor.onSecondaryFixedVariant =>
        colorScheme.onSecondaryFixedVariant,
      SchemeColor.tertiary => colorScheme.tertiary,
      SchemeColor.onTertiary => colorScheme.onTertiary,
      SchemeColor.tertiaryContainer => colorScheme.tertiaryContainer,
      SchemeColor.onTertiaryContainer => colorScheme.onTertiaryContainer,
      SchemeColor.tertiaryFixed => colorScheme.tertiaryFixed,
      SchemeColor.tertiaryFixedDim => colorScheme.tertiaryFixedDim,
      SchemeColor.onTertiaryFixed => colorScheme.onTertiaryFixed,
      SchemeColor.onTertiaryFixedVariant => colorScheme.onTertiaryFixedVariant,
      SchemeColor.error => colorScheme.error,
      SchemeColor.onError => colorScheme.onError,
      SchemeColor.errorContainer => colorScheme.errorContainer,
      SchemeColor.onErrorContainer => colorScheme.onErrorContainer,
      SchemeColor.surface => colorScheme.surface,
      SchemeColor.onSurface => colorScheme.onSurface,
      SchemeColor.surfaceDim => colorScheme.surfaceDim,
      SchemeColor.surfaceBright => colorScheme.surfaceBright,
      SchemeColor.surfaceContainerLowest => colorScheme.surfaceContainerLowest,
      SchemeColor.surfaceContainerLow => colorScheme.surfaceContainerLow,
      SchemeColor.surfaceContainer => colorScheme.surfaceContainer,
      SchemeColor.surfaceContainerHigh => colorScheme.surfaceContainerHigh,
      SchemeColor.surfaceContainerHighest =>
        colorScheme.surfaceContainerHighest,
      SchemeColor.onSurfaceVariant => colorScheme.onSurfaceVariant,
      SchemeColor.outline => colorScheme.outline,
      SchemeColor.outlineVariant => colorScheme.outlineVariant,
      SchemeColor.shadow => colorScheme.shadow,
      SchemeColor.scrim => colorScheme.scrim,
      SchemeColor.inverseSurface => colorScheme.inverseSurface,
      SchemeColor.onInverseSurface => colorScheme.onInverseSurface,
      SchemeColor.inversePrimary => colorScheme.inversePrimary,
      SchemeColor.surfaceTint => colorScheme.surfaceTint,
      SchemeColor.black => Colors.black,
      SchemeColor.white => Colors.white,
      SchemeColor.transparent => Colors.transparent
    };
  }

  /// Returns the [SchemeColor] to be used as contrasting pair for the
  /// [SchemeColor] passed in via [value].
  static SchemeColor onSchemeColor(
    SchemeColor value, {
    bool useOnSurfaceVariant = false,
  }) {
    return switch (value) {
      SchemeColor.primary || SchemeColor.surfaceTint => SchemeColor.onPrimary,
      SchemeColor.onPrimary => SchemeColor.primary,
      SchemeColor.primaryContainer => SchemeColor.onPrimaryContainer,
      SchemeColor.onPrimaryContainer => SchemeColor.primaryContainer,
      SchemeColor.primaryFixed => SchemeColor.onPrimaryFixed,
      SchemeColor.onPrimaryFixed => SchemeColor.primaryFixed,
      SchemeColor.primaryFixedDim => SchemeColor.onPrimaryFixedVariant,
      SchemeColor.onPrimaryFixedVariant => SchemeColor.primaryFixedDim,
      SchemeColor.secondary => SchemeColor.onSecondary,
      SchemeColor.onSecondary => SchemeColor.secondary,
      SchemeColor.secondaryContainer => SchemeColor.onSecondaryContainer,
      SchemeColor.onSecondaryContainer => SchemeColor.secondaryContainer,
      SchemeColor.secondaryFixed => SchemeColor.onSecondaryFixed,
      SchemeColor.onSecondaryFixed => SchemeColor.secondaryFixed,
      SchemeColor.secondaryFixedDim => SchemeColor.onSecondaryFixedVariant,
      SchemeColor.onSecondaryFixedVariant => SchemeColor.secondaryFixedDim,
      SchemeColor.tertiary => SchemeColor.onTertiary,
      SchemeColor.onTertiary => SchemeColor.tertiary,
      SchemeColor.tertiaryContainer => SchemeColor.onTertiaryContainer,
      SchemeColor.onTertiaryContainer => SchemeColor.tertiaryContainer,
      SchemeColor.tertiaryFixed => SchemeColor.onTertiaryFixed,
      SchemeColor.onTertiaryFixed => SchemeColor.tertiaryFixed,
      SchemeColor.tertiaryFixedDim => SchemeColor.onTertiaryFixedVariant,
      SchemeColor.onTertiaryFixedVariant => SchemeColor.tertiaryFixedDim,
      SchemeColor.error => SchemeColor.onError,
      SchemeColor.onError => SchemeColor.error,
      SchemeColor.errorContainer => SchemeColor.onErrorContainer,
      SchemeColor.onErrorContainer => SchemeColor.errorContainer,
      SchemeColor.surface ||
      SchemeColor.surfaceDim ||
      SchemeColor.surfaceBright ||
      SchemeColor.surfaceContainerLowest ||
      SchemeColor.surfaceContainerLow ||
      SchemeColor.surfaceContainer ||
      SchemeColor.surfaceContainerHigh ||
      SchemeColor.surfaceContainerHighest ||
      SchemeColor.transparent =>
        useOnSurfaceVariant
            ? SchemeColor.onSurfaceVariant
            : SchemeColor.onSurface,
      SchemeColor.onSurface => SchemeColor.surface,
      SchemeColor.onSurfaceVariant => SchemeColor.surfaceContainerLowest,
      SchemeColor.outline => SchemeColor.surface,
      SchemeColor.outlineVariant => SchemeColor.onSurface,
      SchemeColor.shadow => SchemeColor.outline,
      SchemeColor.scrim => SchemeColor.outline,
      SchemeColor.inverseSurface => SchemeColor.onInverseSurface,
      SchemeColor.onInverseSurface => SchemeColor.inverseSurface,
      SchemeColor.inversePrimary => SchemeColor.onSurface,
      SchemeColor.black => SchemeColor.white,
      SchemeColor.white => SchemeColor.black
    };
  }

  /// Returns the [Color] from passed in [ColorScheme] in [colorScheme]
  /// that is the "on" color pair corresponding to the [SchemeColor] enum
  /// value passed in via [value].
  ///
  /// This function is used to get the color value for the color pair to the
  /// passed in scheme enum value, thus giving the correct Colorscheme based
  /// contrast color for the provided [SchemeColor]. For example passing in
  /// [SchemeColor.primary] enum value, will return the [ColorScheme.onPrimary].
  /// Wise versa, passing in [SchemeColor.onPrimary] will return the color
  /// [ColorScheme.primary].
  ///
  /// For the extra colors, black is pair for white and wise versa and
  /// transparent is paired with onSurface.
  static Color schemeColorPair(
    SchemeColor value,
    ColorScheme colorScheme, {
    bool useOnSurfaceVariant = false,
  }) =>
      schemeColor(
        onSchemeColor(value, useOnSurfaceVariant: useOnSurfaceVariant),
        colorScheme,
      );

  /// A factor used by tinted interactions to increase the alpha based
  /// opacity Material-3 baseline based opacity values for hover, focus and
  /// splash under certain conditions.
  ///
  /// Used by component themes. The factor is different depending on
  /// if the color is light or dark. This factor increases the opacity of
  /// the overlay color compared to the opacity used by M3 default. It works
  /// well because the overlay color is also alpha blend colored. This extra
  /// factor is used for interaction effects on colored widgets, when
  /// using interactions on surface colors a lower factor is used.
  static double _tintAlphaFactor(
    Color color,
    Brightness mode, [
    bool surfaceMode = false,
  ]) {
    if (mode == Brightness.light) {
      return surfaceMode
          ? ThemeData.estimateBrightnessForColor(color) == Brightness.dark
              ? 1.5
              : 4.0
          : ThemeData.estimateBrightnessForColor(color) == Brightness.dark
              ? 5.0
              : 2.0;
    } else {
      return surfaceMode
          ? ThemeData.estimateBrightnessForColor(color) == Brightness.dark
              ? 5.0
              : 2.0
          : ThemeData.estimateBrightnessForColor(color) == Brightness.dark
              ? 5.0
              : 4.0;
    }
  }

  /// Returns the FCS opinionated tinted hover color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedHovered(Color overlay, Color tint, [double factor = 1]) {
    // Used kAlphaTintedHighlight 0x11 = 17 = 6.7%
    final double usedAlpha =
        (kAlphaTintedHovered * factor).round().clamp(0x00, 0xFF) / 255;
    // Tint color alpha blend into overlay kTintHover 0xB2 = 178 = 69.8%
    return overlay.blendAlpha(tint, kTintHover).withValues(alpha: usedAlpha);
  }

  /// Returns the FCS opinionated tinted highlight color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedHighlight(Color overlay, Color tint, [double factor = 1]) {
    // Used kAlphaTintedHighlight 0x0F = 15 = 5.9%
    final double usedAlpha =
        (kAlphaTintedHighlight * factor).round().clamp(0x00, 0xFF) / 255;
    // Tint color alpha blend into overlay kTintHighlight 0xA5 = 165 = 65%
    return overlay
        .blendAlpha(tint, kTintHighlight)
        .withValues(alpha: usedAlpha);
  }

  /// Returns the FCS opinionated tinted splash color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedSplash(Color overlay, Color tint, [double factor = 1]) {
    // Used kAlphaTintSplash 0x10 = 16 = 6.3%
    final double usedAlpha =
        (kAlphaTintSplash * factor).round().clamp(0x00, 0xFF) / 255;
    // Tint color alpha blend into overlay kTintSplash 0xA5 = 165 = 65%
    return overlay.blendAlpha(tint, kTintSplash).withValues(alpha: usedAlpha);
  }

  /// Returns the FCS opinionated tinted splash color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedPressed(Color overlay, Color tint, [double factor = 1]) {
    // Used kAlphaTintPressed 0x10 = 16 = 6.3%
    final double usedAlpha =
        (kAlphaTintPressed * factor).round().clamp(0x00, 0xFF) / 255;
    // Tint color alpha blend into overlay kTintPressed 0xA5 = 165 = 65%
    return overlay.blendAlpha(tint, kTintPressed).withValues(alpha: usedAlpha);
  }

  /// Returns the FCS opinionated tinted focus color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedFocused(Color overlay, Color tint, [double factor = 1]) {
    // Used kAlphaTintFocused 0x1C = 28 = 11%
    final double usedAlpha =
        (kAlphaTintFocused * factor).round().clamp(0x00, 0xFF) / 255;
    // Tint color alpha blend into overlay kTintFocus 0xB2 = 178 = 70%.
    return overlay.blendAlpha(tint, kTintFocus).withValues(alpha: usedAlpha);
  }

  /// Returns the FCS opinionated tinted disabled color on an overlay color.
  ///
  /// Typically the primary color is the color used as tint base.
  /// The tint effect is different for light and dark mode.
  static Color tintedDisable(Color overlay, Color tint) =>
      // Tint color alpha blend into overlay #66=40%
      // Opacity of result #61=38%, same as M3 opacity on disable.
      overlay
          .blendAlpha(tint, kTintDisabled)
          .withValues(alpha: kAlphaDisabledFloat);

  /// An opinionated [AppBarTheme] theme.
  ///
  /// Contrary to the other opinionated static [FlexSubThemes] sub-theme
  /// function, this one is only a sub-set of the original and does not do or
  /// contain any feature shortcuts.
  ///
  /// The [FlexColorScheme.toTheme] needs some of the properties, like fore-
  /// and background colors used here, for other component theme definitions as
  /// well, and has already computed them once, so they are only reused here.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [centerTitle]
  /// Whether the AppBar title should be centered.
  ///
  /// Overrides the default value of [AppBar.centerTitle] property in all
  /// descendant [AppBar] widgets. If this property is null, then value
  /// is adapted to the current [TargetPlatform].
  ///
  /// * [backgroundColor]
  /// Overrides the default value of [AppBar.backgroundColor] in all
  /// descendant [AppBar] widgets.
  ///
  /// See also:
  ///
  ///  * [foregroundColor], which overrides the default value of
  ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
  ///
  /// * [foregroundColor]
  /// Overrides the default value of [AppBar.foregroundColor] in all
  /// descendant [AppBar] widgets.
  ///
  /// See also:
  ///
  ///  * [backgroundColor], which overrides the default value of
  ///    [AppBar.backgroundColor] in all descendant [AppBar] widgets.
  ///
  /// * [elevation]
  /// Overrides the default value of [AppBar.elevation] in all
  /// descendant [AppBar] widgets.
  ///
  /// * [scrolledUnderElevation]
  /// Overrides the default value of [AppBar.scrolledUnderElevation] in all
  /// descendant [AppBar] widgets.
  ///
  /// If not defined, defaults to 3.
  ///
  /// * [iconTheme]
  /// Overrides the default value of [AppBar.iconTheme] in all
  /// descendant [AppBar] widgets.
  ///
  /// See also:
  ///
  ///  * [actionsIconTheme], which overrides the default value of
  ///    [AppBar.actionsIconTheme] in all descendant [AppBar] widgets.
  ///  * [foregroundColor], which overrides the default value
  ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
  ///
  /// * [actionsIconTheme]
  /// Overrides the default value of [AppBar.actionsIconTheme] in all
  /// descendant [AppBar] widgets.
  ///
  /// See also:
  ///
  ///  * [iconTheme], which overrides the default value of
  ///    [AppBar.iconTheme] in all descendant [AppBar] widgets.
  ///  * [foregroundColor], which overrides the default value
  ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
  ///
  /// * [shadowColor]
  /// Overrides the default value of [AppBar.shadowColor] in all
  /// descendant [AppBar] widgets.
  ///
  /// * [toolbarTextStyle]
  /// Overrides the default value of the [AppBar.toolbarTextStyle]
  /// property in all descendant [AppBar] widgets.
  ///
  /// * [titleTextStyle]
  /// Overrides the default value of [AppBar.titleTextStyle]
  /// property in all descendant [AppBar] widgets.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value of [AppBar.surfaceTintColor] in all
  /// descendant [AppBar] widgets.
  ///
  /// * [systemOverlayStyle]
  /// Overrides the default value of [AppBar.systemOverlayStyle]
  /// property in all descendant [AppBar] widgets.
  static AppBarThemeData appBarTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    final ColorScheme? colorScheme,

    /// Whether the AppBar title should be centered.
    ///
    /// Overrides the default value of [AppBar.centerTitle] property in all
    /// descendant [AppBar] widgets. If this property is null, then value
    /// is adapted to the current [TargetPlatform].
    final bool? centerTitle,

    /// Overrides the default value of [AppBar.backgroundColor] in all
    /// descendant [AppBar] widgets.
    ///
    /// See also:
    ///
    ///  * [foregroundColor], which overrides the default value of
    ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
    final Color? backgroundColor,

    /// Overrides the default value of [AppBar.foregroundColor] in all
    /// descendant [AppBar] widgets.
    ///
    /// See also:
    ///
    ///  * [backgroundColor], which overrides the default value of
    ///    [AppBar.backgroundColor] in all descendant [AppBar] widgets.
    final Color? foregroundColor,

    /// Overrides the default value of [AppBar.elevation] in all
    /// descendant [AppBar] widgets.
    final double? elevation,

    /// Overrides the default value of [AppBar.scrolledUnderElevation] in all
    /// descendant [AppBar] widgets.
    ///
    /// If not defined, defaults to 3.
    final double? scrolledUnderElevation,

    /// Overrides the default value of [AppBar.iconTheme] in all
    /// descendant [AppBar] widgets.
    ///
    /// See also:
    ///
    ///  * [actionsIconTheme], which overrides the default value of
    ///    [AppBar.actionsIconTheme] in all descendant [AppBar] widgets.
    ///  * [foregroundColor], which overrides the default value
    ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
    final IconThemeData? iconTheme,

    /// Overrides the default value of [AppBar.actionsIconTheme] in all
    /// descendant [AppBar] widgets.
    ///
    /// See also:
    ///
    ///  * [iconTheme], which overrides the default value of
    ///    [AppBar.iconTheme] in all descendant [AppBar] widgets.
    ///  * [foregroundColor], which overrides the default value
    ///    [AppBar.foregroundColor] in all descendant [AppBar] widgets.
    final IconThemeData? actionsIconTheme,

    /// Overrides the default value of [AppBar.shadowColor] in all
    /// descendant [AppBar] widgets.
    final Color? shadowColor,

    /// Overrides the default value of the [AppBar.toolbarTextStyle]
    /// property in all descendant [AppBar] widgets.
    final TextStyle? toolbarTextStyle,

    /// Overrides the default value of [AppBar.titleTextStyle]
    /// property in all descendant [AppBar] widgets.
    final TextStyle? titleTextStyle,

    /// Overrides the default value of [AppBar.surfaceTintColor] in all
    /// descendant [AppBar] widgets.
    final Color? surfaceTintColor,

    /// Overrides the default value of [AppBar.systemOverlayStyle]
    /// property in all descendant [AppBar] widgets.
    final SystemUiOverlayStyle? systemOverlayStyle,
  }) =>
      _appBarTheme(
        colorScheme: colorScheme,
        centerTitle: centerTitle,
        backgroundColor: backgroundColor,
        foregroundColor: foregroundColor,
        elevation: elevation,
        scrolledUnderElevation: scrolledUnderElevation,
        iconTheme: iconTheme,
        actionsIconTheme: actionsIconTheme,
        shadowColor: shadowColor,
        toolbarTextStyle: toolbarTextStyle,
        titleTextStyle: titleTextStyle,
        surfaceTintColor: surfaceTintColor,
        systemOverlayStyle: systemOverlayStyle,
      );

  /// An opinionated [BottomAppBarTheme] theme.
  ///
  /// The [BottomAppBarTheme] allows setting only of background color in FCS.
  /// Other properties are not used by FCS at this stage.
  ///
  /// The [BottomAppBarTheme] has no properties for foreground color. If you use
  /// a background color that requires different contrast color than the
  /// active theme's surface colors, you will need to set their colors on
  /// widget level on elements placed on the [BottomAppBar].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// background color for the [BottomAppBar].
  ///
  /// If not defined, [ColorScheme.surfaceContainer] will be used via default
  /// widget behavior for M3 mode and explicitly set to [ColorScheme.surface]
  /// for M2 mode.
  ///
  /// * [elevation]
  /// Overrides the default value for [BottomAppBar.elevation].
  ///
  /// If undefined (null), defaults to 3 in M3 and to 8 in M2 mode.
  ///
  /// * [shape]
  /// Overrides the default value for [BottomAppBar.shape].
  ///
  /// * [height]
  /// Overrides the default value for [BottomAppBar.height].
  ///
  /// If this is null, then in M2 the default value is the minimum in relation
  /// to the content, in M3 defaults to 80.0.
  ///
  /// * [padding]
  /// Overrides the default value for [BottomAppBar.padding].
  ///
  /// In M3 the padding will default to
  /// `EdgeInsets.symmetric(vertical: 12.0, horizontal: 16.0)`
  /// In M2 the value will default to EdgeInsets.zero.
  ///
  /// * [shadowColor]
  /// Overrides the default value of [BottomSheet.shadowColor].
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for [BottomAppBar.surfaceTintColor].
  ///
  /// See [Material.surfaceTintColor] for more details.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static BottomAppBarThemeData bottomAppBarTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the
    /// background color for the [BottomAppBar].
    ///
    /// If not defined, [ColorScheme.surfaceContainer] will be used via default
    /// widget behavior for M3 mode and explicitly set to [surface] for M2 mode.
    final SchemeColor? backgroundSchemeColor,

    /// Overrides the default value for [BottomAppBar.elevation].
    ///
    /// If undefined (null), defaults to 3 in M3 and to 8 in M2 mode.
    final double? elevation,

    /// Overrides the default value for [BottomAppBar.shape].
    final NotchedShape? shape,

    /// Overrides the default value for [BottomAppBar.height].
    ///
    /// If this is null, then in M2 the default value is the minimum in relation
    /// to the content, in M3 defaults to 80.0.
    final double? height,

    /// Overrides the default value for [BottomAppBar.padding].
    ///
    /// In M3 the padding will default to
    /// `EdgeInsets.symmetric(vertical: 12.0, horizontal: 16.0)`
    /// In M2 the value will default to EdgeInsets.zero.
    final EdgeInsetsGeometry? padding,

    /// Overrides the default value of [BottomSheet.shadowColor].
    final Color? shadowColor,

    /// Overrides the default value for [BottomAppBar.surfaceTintColor].
    ///
    /// See [Material.surfaceTintColor] for more details.
    final Color? surfaceTintColor,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _bottomAppBarTheme(
          colorScheme: colorScheme,
          backgroundSchemeColor: backgroundSchemeColor,
          elevation: elevation,
          shape: shape,
          height: height,
          padding: padding,
          shadowColor: shadowColor,
          surfaceTintColor: surfaceTintColor,
          useMaterial3: useMaterial3);

  /// An opinionated [BottomNavigationBarThemeData] with custom elevation.
  ///
  /// This sub-theme uses a style that prefers single use config parameters over
  /// the ones that combines many styling options into TextStyle and icon
  /// sub-theme properties. This is simpler to use when you want to
  /// modify a single property like size and rest is fine. This of course comes
  /// at the expense that the sub-theme instead has more properties.
  ///
  /// Its [elevation] defaults to [kBottomNavigationBarElevation] = 0.
  ///
  /// The bottom navigation bar uses opinionated colors choices from the passed
  /// [colorScheme] to style the bottom navigation bar.
  ///
  /// Background [opacity] can be set.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically you would pass the same [ColorScheme] that is also used in
  /// your [ThemeData] definition.
  ///
  /// * [labelTextStyle]
  /// Optional text style for the [BottomNavigationBar] labels.
  ///
  /// If not defined [TextTheme.bodyMedium] will be used as base style for
  /// the style.
  ///
  /// The size and colors defined in any of the text size and color properties
  /// are applied as overrides on the text style.
  ///
  /// * [selectedLabelSize]
  /// The size of the text label on selected [BottomNavigationBar] item.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on selected item
  ///
  /// Defaults to 14.
  ///
  /// * [unselectedLabelSize]
  /// The size of the text label on unselected [BottomNavigationBar] items.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on unselected items. Defaults to [selectedLabelSize] - 2, but min 8.
  /// Smaller than 8dp is not legible on most screens.
  ///
  /// [BottomNavigationBar] uses this -2dp smaller font on the unselected
  /// label as default, since it is so based on Material-2 spec. By assigning
  /// same value as to selectedLabelSize, you can make them the same size.
  ///
  /// * [selectedLabelSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [BottomNavigationBar]'s selected label text color.
  ///
  /// If undefined, defaults to [SchemeColor.primary].
  ///
  /// * [unselectedLabelSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [BottomNavigationBar]'s unselected label text color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also
  /// undefined, then in Material-3 this defaults to
  /// [SchemeColor.onSurfaceVariant] and in Material-2 to
  /// [SchemeColor.onSurface].
  ///
  /// Flutter SDK defaults to [ThemeData.unselectedWidgetColor] which is
  /// [Colors.black54] in light mode and [Colors.white70] in dark.
  ///
  /// * [mutedUnselectedLabel]
  /// If true, the unselected labels in the [BottomNavigationBar] use a
  /// more muted color version of the color defined by
  /// [unselectedLabelSchemeColor].
  ///
  /// If undefined, defaults to true in Material-2 and to false in Material-3.
  ///
  /// When true, this is visually similar to the default styling used in
  /// Material-2, but it is on purpose not an exact match, it is bit more
  /// color expressive.
  ///
  /// * [selectedIconSize]
  /// The size of the icon on selected [BottomNavigationBar] item.
  ///
  /// If undefined, it defaults to 24.
  ///
  /// * [unselectedIconSize]
  /// The size of the icons on unselected [BottomNavigationBar] items.
  ///
  /// If undefined, defaults to [selectedIconSize].
  ///
  /// * [selectedIconSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [BottomNavigationBar]'s selected item icon color.
  ///
  /// If undefined, defaults to [SchemeColor.primary].
  ///
  /// * [unselectedIconSchemeColor]
  /// Select which color from the passed in [ColorScheme] to use as base for
  /// the [BottomNavigationBar]'s unselected items icon color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also
  /// undefined, then in Material-3 this defaults to
  /// [SchemeColor.onSurfaceVariant] and in Material-2 to
  /// [SchemeColor.onSurface].
  ///
  /// Flutter SDK defaults to [ThemeData.unselectedWidgetColor] which is
  /// [Colors.black54] in light mode and [Colors.white70] in dark.
  ///
  /// * [mutedUnselectedIcon]
  /// If true, the unselected icon in the [BottomNavigationBar] use a more
  /// muted color version of the color defined by [unselectedIconSchemeColor].
  ///
  /// The muting is unselected color with
  /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
  /// and withAlpha([kUnselectedAlphaBlend]).
  ///
  /// If undefined, defaults to true in Material-2 and to false in Material-3.
  ///
  /// When true, this is visually similar to the default styling used in
  /// Material-2, but it is on purpose not an exact match, it is bit more
  /// color expressive.
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use as background
  /// color for the [BottomNavigationBar].
  ///
  /// If undefined, defaults to [SchemeColor.surface].
  ///
  /// Flutter defaults to [ThemeData.canvasColor] from the [Material] widgets
  /// default color. Typically this is same as [ColorScheme.surface], or it
  /// should and will be, since `ColorScheme.background` is deprecated.
  ///
  /// * [opacity]
  /// BottomNavigationBar background opacity.
  ///
  /// If undefined, defaults to 1, fully opaque.
  ///
  /// * [elevation]
  /// [BottomNavigationBar] container elevation.
  ///
  /// If not defined, defaults to component theme defaults to
  /// [kBottomNavigationBarElevation] = 3.
  ///
  /// * [showSelectedLabels]
  /// Whether the labels are shown for the selected
  /// [BottomNavigationBarItem].
  ///
  /// * [showUnselectedLabels]
  /// Whether the labels are shown for the unselected
  /// [BottomNavigationBarItem]s.
  ///
  /// * [type]
  /// Defines the layout and behavior of a [BottomNavigationBar].
  ///
  /// With [BottomNavigationBarType.fixed] the items have fixed width.
  /// With [BottomNavigationBarType.shifting], the location and size of the
  /// items animate and labels fade in when they are tapped.
  ///
  /// If undefined, defaults to Flutter SDK default. Where
  /// If type is provided, it is returned. Next, if the bottom navigation bar
  /// theme provides a type, it is used. Finally, the default behavior will be
  /// [BottomNavigationBarType.fixed] for 3 or fewer items, and
  /// [BottomNavigationBarType.shifting] is used for 4+ items.
  ///
  /// * [landscapeLayout]
  /// The arrangement of the bar's items when the enclosing
  /// [MediaQueryData.orientation] is [Orientation.landscape].
  ///
  /// The following alternatives are supported:
  ///
  /// * [BottomNavigationBarLandscapeLayout.spread] - the items are
  ///   evenly spaced and spread out across the available width. Each
  ///   item's label and icon are arranged in a column.
  /// * [BottomNavigationBarLandscapeLayout.centered] - the items are
  ///   evenly spaced in a row but only consume as much width as they
  ///   would in portrait orientation. The row of items is centered within
  ///   the available width. Each item's label and icon are arranged
  ///   in a column.
  /// * [BottomNavigationBarLandscapeLayout.linear] - the items are
  ///   evenly spaced and each item's icon and label are lined up in a
  ///   row instead of a column.
  ///
  /// Defaults to [BottomNavigationBarLandscapeLayout.spread] via
  /// Widget's default un-themed behavior.
  ///
  /// * [unselectedAlphaBlend]
  /// The icon color alpha blend value for unselected items, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
  /// 0x66 = 102 = 40%.
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [unselectedAlpha]
  /// The icon alpha value for unselected item, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedAlphaBlend], which is
  /// 0xA5 = 165 = 65%
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  ///
  /// * [useFlutterDefaults]
  /// Set to true to use Flutter SDK defaults for [BottomNavigationBar]
  /// theme when its color, size and text style properties are undefined,
  /// instead of using [FlexColorScheme]'s own defaults.
  ///
  /// Recommend keeping it **false** for a more color harmonized component
  /// theme starting point. This flag may be helpful if you want to create
  /// custom sub-themes starting from less opinionated settings.
  ///
  /// When all required properties are undefined and flag is false or true,
  /// the effective default styles for undefined inputs become:
  ///
  /// ```text
  ///                    FCS defaults   Flutter defaults
  /// useFlutterDefaults false          true
  /// - background       background     background
  /// - selected icon    primary        light: theme primary, dark: secondary
  /// - Selected label   primary        light: theme primary, dark: secondary
  /// - unselected icon  onSurface      light: black54, dark: white70
  /// - unSelected label onSurface      light: black54, dark: white70
  /// ```
  /// FCS further applies both an alpha blend and slight opacity to
  /// unselected icon and unselected label, but only if
  /// [FlexSubThemesData.bottomNavigationBarMutedUnselectedIcon] and
  /// [FlexSubThemesData.bottomNavigationBarMutedUnselectedLabel] are true,
  /// respectively, this also applies to undefined color inputs.
  ///
  /// When muted unselected options are true, the difference to Flutter
  /// default for unselected items is subtle, FCS has a bit more contrast.
  static BottomNavigationBarThemeData bottomNavigationBarTheme({
    /// Typically you would pass the same [ColorScheme] that is also used in
    /// your [ThemeData] definition.
    required final ColorScheme colorScheme,

    /// Optional text style for the [BottomNavigationBar] labels.
    ///
    /// If not defined [bodyMedium] will be used as base style for the style.
    ///
    /// The size and colors defined in any of the text size and color properties
    /// are applied as overrides on the text style.
    final TextStyle? labelTextStyle,

    /// The size of the text label on selected [BottomNavigationBar] item.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on selected item
    ///
    /// Defaults to 14.
    final double? selectedLabelSize,

    /// The size of the text label on unselected [BottomNavigationBar] items.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on unselected items. Defaults to [selectedLabelSize] - 2, but min 8.
    /// Smaller than 8dp is not legible on most screens.
    ///
    /// [BottomNavigationBar] uses this -2dp smaller font on the unselected
    /// label as default, since it is so based on Material-2 spec. By assigning
    /// same value as to selectedLabelSize, you can make them the same size.
    final double? unselectedLabelSize,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [BottomNavigationBar]'s selected label text color.
    ///
    /// If undefined, defaults to [SchemeColor.primary].
    final SchemeColor? selectedLabelSchemeColor,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [BottomNavigationBar]'s unselected label text color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also
    /// undefined, then in Material-3 this defaults to
    /// [SchemeColor.onSurfaceVariant] and in Material-2 to
    /// [SchemeColor.onSurface].
    ///
    /// Flutter SDK defaults to [ThemeData.unselectedWidgetColor] which is
    /// [Colors.black54] in light mode and [Colors.white70] in dark.
    final SchemeColor? unselectedLabelSchemeColor,

    /// If true, the unselected labels in the [BottomNavigationBar] use a
    /// more muted color version of the color defined by
    /// [unselectedLabelSchemeColor].
    ///
    /// If undefined, defaults to true in Material-2 and to false in Material-3.
    ///
    /// When true, this is visually similar to the default styling used in
    /// Material-2, but it is on purpose not an exact match, it is bit more
    /// color expressive.
    final bool? mutedUnselectedLabel,

    /// The size of the icon on selected [BottomNavigationBar] item.
    ///
    /// If undefined, it defaults to 24.
    final double? selectedIconSize,

    /// The size of the icons on unselected [BottomNavigationBar] items.
    ///
    /// If undefined, defaults to [selectedIconSize].
    final double? unselectedIconSize,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [BottomNavigationBar]'s selected item icon color.
    ///
    /// If undefined, defaults to [SchemeColor.primary].
    final SchemeColor? selectedIconSchemeColor,

    /// Select which color from the passed in [ColorScheme] to use as base for
    /// the [BottomNavigationBar]'s unselected items icon color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also
    /// undefined, then in Material-3 this defaults to
    /// [SchemeColor.onSurfaceVariant] and in Material-2 to
    /// [SchemeColor.onSurface].
    ///
    /// Flutter SDK defaults to [ThemeData.unselectedWidgetColor] which is
    /// [Colors.black54] in light mode and [Colors.white70] in dark.
    final SchemeColor? unselectedIconSchemeColor,

    // TODO(rydmike): Commented as part of deprecation of blendTextTheme.
    // An alternative unselected item color.
    //
    // It is used as fallback if [unselectedIconSchemeColor] is not specified,
    // before its normal default fallbacks.
    //
    // The color is typically used to provide the color created by blended or
    // tinted text theme, when it is being used by FlexColorScheme as an
    // `onSurfaceVariant` equivalent style, but a bit more primary tinted.
    //
    // FlexColorScheme passes in its `onSurfaceVariantBlendedTextStyle` when
    // a blended TextTheme is being used.
    // final Color? altUnselectedColor,

    /// If true, the unselected icon in the [BottomNavigationBar] use a more
    /// muted color version of the color defined by
    /// [bottomNavigationBarUnselectedIconSchemeColor].
    ///
    /// The muting is unselected color with
    /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
    /// and withAlpha([kUnselectedAlphaBlend]).
    ///
    /// If undefined, defaults to true in Material-2 and to false in Material-3.
    ///
    /// When true, this is visually similar to the default styling used in
    /// Material-2, but it is on purpose not an exact match, it is bit more
    /// color expressive.
    final bool? mutedUnselectedIcon,

    /// Select which color from the theme's [ColorScheme] to use as background
    /// color for the [BottomNavigationBar].
    ///
    /// If undefined, defaults to [SchemeColor.surface].
    ///
    /// Flutter defaults to [ThemeData.canvasColor] from the [Material] widgets
    /// default color. Typically this is same as [ColorScheme.surface], or it
    /// should and will be, since [ColorScheme.background] is deprecated.
    final SchemeColor? backgroundSchemeColor,

    /// BottomNavigationBar background opacity.
    ///
    /// If undefined, defaults to 1, fully opaque.
    final double? opacity,

    /// [BottomNavigationBar] container elevation.
    ///
    /// If not defined, defaults to component theme defaults to
    /// [kBottomNavigationBarElevation] = 3.
    final double? elevation,

    /// Whether the labels are shown for the selected
    /// [BottomNavigationBarItem].
    final bool? showSelectedLabels,

    /// Whether the labels are shown for the unselected
    /// [BottomNavigationBarItem]s.
    final bool? showUnselectedLabels,

    /// Defines the layout and behavior of a [BottomNavigationBar].
    ///
    /// With [BottomNavigationBarType.fixed] the items have fixed width.
    /// With [BottomNavigationBarType.shifting], the location and size of the
    /// items animate and labels fade in when they are tapped.
    ///
    /// If undefined, defaults to Flutter SDK default. Where
    /// If type is provided, it is returned. Next, if the bottom navigation bar
    /// theme provides a type, it is used. Finally, the default behavior will be
    /// [BottomNavigationBarType.fixed] for 3 or fewer items, and
    /// [BottomNavigationBarType.shifting] is used for 4+ items.
    final BottomNavigationBarType? type,

    /// The arrangement of the bar's [items] when the enclosing
    /// [MediaQueryData.orientation] is [Orientation.landscape].
    ///
    /// The following alternatives are supported:
    ///
    /// * [BottomNavigationBarLandscapeLayout.spread] - the items are
    ///   evenly spaced and spread out across the available width. Each
    ///   item's label and icon are arranged in a column.
    /// * [BottomNavigationBarLandscapeLayout.centered] - the items are
    ///   evenly spaced in a row but only consume as much width as they
    ///   would in portrait orientation. The row of items is centered within
    ///   the available width. Each item's label and icon are arranged
    ///   in a column.
    /// * [BottomNavigationBarLandscapeLayout.linear] - the items are
    ///   evenly spaced and each item's icon and label are lined up in a
    ///   row instead of a column.
    ///
    /// Defaults to [BottomNavigationBarLandscapeLayout.spread] via
    /// Widget's default un-themed behavior.
    final BottomNavigationBarLandscapeLayout? landscapeLayout,

    /// The icon color alpha blend value for unselected items, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
    /// 0x66 = 102 = 40%.
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlphaBlend = kUnselectedBackgroundPrimaryAlphaBlend,

    /// The icon alpha value for unselected item, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedAlphaBlend], which is
    /// 0xA5 = 165 = 65%
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlpha = kUnselectedAlphaBlend,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,

    /// Set to true to use Flutter SDK defaults for [BottomNavigationBar]
    /// theme when its color, size and text style properties are undefined,
    /// instead of using [FlexColorScheme]'s own defaults.
    ///
    /// Recommend keeping it **false** for a more color harmonized component
    /// theme starting point. This flag may be helpful if you want to create
    /// custom sub-themes starting from less opinionated settings.
    ///
    /// When all required properties are undefined and flag is false or true,
    /// the effective default styles for undefined inputs become:
    ///
    /// ```text
    ///                    FCS defaults   Flutter defaults
    /// useFlutterDefaults false          true
    /// - background       background     background
    /// - selected icon    primary        light: theme primary, dark: secondary
    /// - Selected label   primary        light: theme primary, dark: secondary
    /// - unselected icon  onSurface      light: black54, dark: white70
    /// - unSelected label onSurface      light: black54, dark: white70
    /// ```
    /// FCS further applies both an alpha blend and slight opacity to
    /// unselected icon and unselected label, but only if
    /// [FlexSubThemesData.bottomNavigationBarMutedUnselectedIcon] and
    /// [FlexSubThemesData.bottomNavigationBarMutedUnselectedLabel] are true,
    /// respectively, this also applies to undefined color inputs.
    ///
    /// When muted unselected options are true, the difference to Flutter
    /// default for unselected items is subtle, FCS has a bit more contrast.
    @Deprecated(
      'The `useFlutterDefaults` is deprecated, it no longer has any '
      'function and will be removed in v9. FlexColorScheme in M3 mode '
      'defaults to using mostly Flutter defaults styles. '
      'For other configurations modify the theme as desired. '
      'In M2 mode FCS will continue to use its own opinionated defaults for '
      'as long as M2 exists.',
    )
    final bool? useFlutterDefaults,
  }) =>
      _bottomNavigationBarTheme(
        colorScheme: colorScheme,
        labelTextStyle: labelTextStyle,
        selectedLabelSize: selectedLabelSize,
        unselectedLabelSize: unselectedLabelSize,
        selectedLabelSchemeColor: selectedLabelSchemeColor,
        unselectedLabelSchemeColor: unselectedLabelSchemeColor,
        mutedUnselectedLabel: mutedUnselectedLabel,
        selectedIconSize: selectedIconSize,
        unselectedIconSize: unselectedIconSize,
        selectedIconSchemeColor: selectedIconSchemeColor,
        unselectedIconSchemeColor: unselectedIconSchemeColor,
        mutedUnselectedIcon: mutedUnselectedIcon,
        backgroundSchemeColor: backgroundSchemeColor,
        opacity: opacity,
        elevation: elevation,
        showSelectedLabels: showSelectedLabels,
        showUnselectedLabels: showUnselectedLabels,
        type: type,
        landscapeLayout: landscapeLayout,
        unselectedAlphaBlend: unselectedAlphaBlend,
        unselectedAlpha: unselectedAlpha,
        useMaterial3: useMaterial3,
        // ignore: deprecated_member_use_from_same_package, legacy code
        useFlutterDefaults: useFlutterDefaults,
      );

  /// A theme helper for [BottomSheetThemeData] for customizing the theme
  /// for [BottomSheet].
  ///
  /// Corner [radius] defaults to [kBottomSheetBorderRadius] = 28,
  /// [elevation] to [kBottomSheetElevation] = 4 and [modalElevation] to
  /// [kBottomSheetModalElevation] = 8.
  ///
  /// The named parameters are:
  ///
  /// * [backgroundColor]
  /// Default value for [BottomSheet.backgroundColor].
  ///
  /// If null, defaults to Flutter's default, which is theme canvas color in
  /// M2 mode and surfaceContainerLow in M3 mode.
  ///
  /// * [modalBackgroundColor]
  /// Value for [BottomSheet.backgroundColor] when the Bottom sheet is
  /// presented as a modal bottom sheet.
  ///
  /// If null, defaults to Flutter's default, which is theme canvas color in
  /// M2 mode and surfaceContainerLow in M3 mode.
  ///
  /// * [elevation]
  /// The none modal bottom sheet elevation.
  ///
  /// If null, defaults to [kBottomSheetElevation] = 1.
  ///
  /// * [modalElevation]
  /// The modal bottom sheet elevation.
  ///
  /// If null, defaults to [kBottomSheetModalElevation] = 2.
  ///
  /// * [radius]
  /// The corner radius of the top corners.
  ///
  /// If not defined, defaults to [kBottomSheetBorderRadius] 28p.
  ///
  /// Follows Material M3 guide as default value.
  /// https://m3.material.io/components/bottom-sheets/specs
  ///
  /// * [clipBehavior]
  /// Defines the bottom sheet's [Material.clipBehavior]
  /// by overriding the default value for [BottomSheet.clipBehavior].
  ///
  /// Use this property to enable clipping of content when the bottom sheet
  /// has a custom shape and the content can extend past this shape.
  /// For example, a bottom sheet with rounded corners and an edge-to-edge
  /// [Image] at the top.
  ///
  /// If this property is null then then the behavior will be [Clip.none],
  /// via Flutter's default values.
  ///
  /// * [constraints]
  /// Constrains the size of the [BottomSheet].
  ///
  /// If null, the bottom sheet's size will be unconstrained.
  ///
  /// * [shadowColor]
  /// Overrides the default value of [BottomSheet.shadowColor].
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for surfaceTintColor.
  ///
  /// See [Material.surfaceTintColor] for more details.
  static BottomSheetThemeData bottomSheetTheme({
    /// Default value for [BottomSheet.backgroundColor].
    ///
    /// If null, defaults to Flutter's default, which is theme canvas color in
    /// M2 mode and surfaceContainerLow in M3 mode.
    final Color? backgroundColor,

    /// Value for [BottomSheet.backgroundColor] when the Bottom sheet is
    /// presented as a modal bottom sheet.
    ///
    /// If null, defaults to Flutter's default, which is theme canvas color in
    /// M2 mode and surfaceContainerLow in M3 mode.
    final Color? modalBackgroundColor,

    /// The none modal bottom sheet elevation.
    ///
    /// If null, defaults to [kBottomSheetElevation] = 1.
    final double? elevation,

    /// The modal bottom sheet elevation.
    ///
    /// If null, defaults to [kBottomSheetModalElevation] = 2.
    final double? modalElevation,

    /// The corner radius of the top corners.
    ///
    /// If not defined, defaults to [kBottomSheetBorderRadius] 28p.
    ///
    /// Follows Material M3 guide as default value.
    /// https://m3.material.io/components/bottom-sheets/specs
    final double? radius,

    /// Defines the bottom sheet's [Material.clipBehavior]
    /// by overriding the default value for [BottomSheet.clipBehavior].
    ///
    /// Use this property to enable clipping of content when the bottom sheet
    /// has a custom [shape] and the content can extend past this shape.
    /// For example, a bottom sheet with rounded corners and an edge-to-edge
    /// [Image] at the top.
    ///
    /// If this property is null then then the behavior will be [Clip.none],
    /// via Flutter's default values.
    final Clip? clipBehavior,

    /// Constrains the size of the [BottomSheet].
    ///
    /// If null, the bottom sheet's size will be unconstrained.
    final BoxConstraints? constraints,

    /// Overrides the default value of [BottomSheet.shadowColor].
    final Color? shadowColor,

    /// Overrides the default value for surfaceTintColor.
    ///
    /// See [Material.surfaceTintColor] for more details.
    final Color? surfaceTintColor,
  }) =>
      _bottomSheetTheme(
        backgroundColor: backgroundColor,
        modalBackgroundColor: modalBackgroundColor,
        elevation: elevation,
        modalElevation: modalElevation,
        radius: radius,
        clipBehavior: clipBehavior,
        constraints: constraints,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
      );

  /// An opinionated [ButtonThemeData] theme.
  ///
  /// The `ButtonThemeData` is marked as **obsolete** in Flutter SDK
  /// documentation, but not yet deprecated in Flutter stable SDK 3.24.x.
  ///
  /// This sub-theme will be removed in FCS when Flutter SDK deprecates
  /// [ButtonThemeData].
  ///
  /// This theme is used to provide the same opinionated theme and style on
  /// the deprecated buttons `RaisedButton`, `OutlineButtons` and `FlatButton`.
  /// Button theme has more limited theming capability and cannot match
  /// the Material style buttons fully, this is an approximation.
  ///
  /// The adjustable button corner [radius] defaults to 20. This was an early
  /// default in M3 for buttons, it was later changed to stadium border.
  /// Flutter SDK M2 defaults to 4.
  ///
  /// The button `padding` defaults to: EdgeInsets.symmetric(horizontal: 16).
  /// It is used to make the buttons match the padding on the newer buttons.
  ///
  /// The above legacy buttons this sub theme is for, will be completely
  /// removed in Flutter stable version. The `ButtonThemeData` this helper uses
  /// will however remain available after that, because widgets
  /// [DropdownButton], plus [MaterialButton] (marked as
  /// obsolete in SDK docs though) still use this theme. It is thus kept around
  /// in FlexColorScheme package as long as it might have some use and exists
  /// in Flutter stable SDK.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the button.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [radius]
  /// The button corner radius.
  ///
  /// If not defined, defaults to [kButtonRadius] 40dp,
  /// based on earlier M3 specification, that was later changed to stadium.
  /// https://m3.material.io/components/buttons/specs
  ///
  /// * [padding]
  /// Padding for legacy button.
  ///
  /// If not defined,
  /// defaults to [kButtonPadding] = `EdgeInsets.symmetric(horizontal: 16)`.
  /// This makes the legacy buttons same size as default margin on new ones.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If undefined, defaults to [kButtonMinSize] = Size(40, 40).
  ///
  /// * [alignedDropdown]
  /// If true, then a [DropdownButton] menu's width will match the button's
  /// width.
  ///
  /// If false (the default), then the dropdown's menu will be wider than
  /// its button. In either case the dropdown button will line up the leading
  /// edge of the menu's value with the leading edge of the values
  /// displayed by the menu items.
  ///
  /// This property only affects [DropdownButton] and its menu.
  ///
  /// If not defined default to false.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  static ButtonThemeData buttonTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the button.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? baseSchemeColor,

    /// The button corner radius.
    ///
    /// If not defined, defaults to [kButtonRadius] 40dp,
    /// based on earlier M3 specification, that was later changed to stadium.
    /// https://m3.material.io/components/buttons/specs
    final double? radius,

    /// Padding for legacy button.
    ///
    /// If not defined,
    /// defaults to [kButtonPadding] = `EdgeInsets.symmetric(horizontal: 16)`.
    /// This makes the legacy buttons same size as default margin on new ones.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If undefined, defaults to [kButtonMinSize] = Size(40, 40).
    final Size? minButtonSize,

    /// If true, then a [DropdownButton] menu's width will match the button's
    /// width.
    ///
    /// If false (the default), then the dropdown's menu will be wider than
    /// its button. In either case the dropdown button will line up the leading
    /// edge of the menu's value with the leading edge of the values
    /// displayed by the menu items.
    ///
    /// This property only affects [DropdownButton] and its menu.
    ///
    /// If not defined default to false.
    final bool? alignedDropdown,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,
  }) =>
      _buttonTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        radius: radius,
        padding: padding,
        minButtonSize: minButtonSize,
        alignedDropdown: alignedDropdown,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
      );

  /// An opinionated [CardThemeData] for [Card] with custom
  /// corner radius and elevation.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// If null, any provided [SchemeColor] values will be ignored and
  /// component theme color defaults will be used.
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in [colorScheme] to use as the
  /// background color of Cards.
  ///
  /// If not defined, defaults to:
  /// - M2: [ThemeData.cardColor]
  /// - M3: Card (elevated): [ColorScheme.surfaceContainerLow]
  /// - M3: Card.filled: [ColorScheme.surfaceContainerHighest]
  /// - M3: Card.outlined: [ColorScheme.surface]
  ///
  /// Warning: The Card variants cannot be themed separately in Flutter, if
  /// you provide a color, all card variants will share the same color.
  /// See issue: https://github.com/flutter/flutter/issues/153912
  ///
  /// * [radius]
  /// Corner radius
  ///
  /// If not defined, defaults to [kCardRadius] 12dp,
  /// based on M3 Specification
  /// https://m3.material.io/components/cards/specs
  ///
  /// * [borderSchemeColor]
  /// Selects which color from the passed in [colorScheme] to use as the
  /// border color for Cards.
  ///
  /// If not defined, defaults to:
  /// - M2: no border
  /// - M3: Card (elevated): no border
  /// - M3: Card.filled: no border
  /// - M3: Card.outlined: [ColorScheme.outlineVariant]
  ///
  /// Warning: The Card variants cannot be themed separately in Flutter, if
  /// you provide a color, all card variants will share the same color.
  /// See issue: https://github.com/flutter/flutter/issues/153912
  ///
  /// * [borderWidth]
  /// Defines the border width of the border on Cards.
  ///
  /// Only used if [borderSchemeColor] is also defined.
  ///
  /// If not defined, defaults to:
  /// - M2: no border
  /// - M3: Card (elevated): no border
  /// - M3: Card.filled: no border
  /// - M3: Card.outlined: 1.0
  ///
  /// Warning: The Card variants cannot be themed separately in Flutter, if
  /// you provide a color, all card variants will share the same color.
  /// See issue: https://github.com/flutter/flutter/issues/153912
  ///
  /// * [elevation]
  /// Card elevation.
  ///
  /// If not defined, defaults to:
  /// - M2: 1.0
  /// - M3: Card (elevated): 1.0
  /// - M3: Card.filled: 0.0
  /// - M3: Card.outlined: 0.0
  ///
  /// Warning: The Card variants cannot be themed separately in Flutter, if
  /// you provide an elevation, all Card variants will get same elevation.
  /// See issue: https://github.com/flutter/flutter/issues/153912
  ///
  /// * [shadowColor]
  /// Overrides the default value for [Card.shadowColor].
  ///
  /// If null, [Card] defaults to fully opaque black.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for [Card.surfaceTintColor].
  ///
  /// If null, [Card] will not display an overlay color.
  ///
  /// See [Material.surfaceTintColor] for more details.
  ///
  /// * [clipBehavior]
  /// The clipBehavior of the card theme, defaults to
  /// [Clip.antiAlias] for smooth clipping when using rounded corners.
  ///
  /// There is no config property in [FlexSubThemesData] for [clipBehavior],
  /// if needed it can be exposed. Feel free to make a PR or submit an issue.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static CardThemeData cardTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    ///
    /// If null, any provided [SchemeColor] values will be ignored and
    /// component theme color defaults will be used.
    final ColorScheme? colorScheme,

    /// Selects which color from the passed in [colorScheme] to use as the
    /// background color of Cards.
    ///
    /// If not defined, defaults to:
    /// - M2: [ThemeData.cardColor]
    /// - M3: Card (elevated): [ColorScheme.surfaceContainerLow]
    /// - M3: Card.filled: [ColorScheme.surfaceContainerHighest]
    /// - M3: Card.outlined: [ColorScheme.surface]
    ///
    /// Warning: The Card variants cannot be themed separately in Flutter, if
    /// you provide a color, all card variants will share the same color.
    /// See issue: https://github.com/flutter/flutter/issues/153912
    final SchemeColor? backgroundSchemeColor,

    /// Corner radius
    ///
    /// If not defined, defaults to [kCardRadius] 12dp,
    /// based on M3 Specification, this is also the opinionated
    /// default for M2 in this package.
    final double? radius,

    /// Selects which color from the passed in [colorScheme] to use as the
    /// border color for Cards.
    ///
    /// If not defined, defaults to:
    /// - M2: no border
    /// - M3: Card (elevated): no border
    /// - M3: Card.filled: no border
    /// - M3: Card.outlined: [ColorScheme.outlineVariant]
    ///
    /// Warning: The Card variants cannot be themed separately in Flutter, if
    /// you provide a color, all card variants will share the same color.
    /// See issue: https://github.com/flutter/flutter/issues/153912
    final SchemeColor? borderSchemeColor,

    /// Defines the border width of the border on Cards.
    ///
    /// Only used if [borderSchemeColor] is also defined.
    ///
    /// If not defined, defaults to:
    /// - M2: no border
    /// - M3: Card (elevated): no border
    /// - M3: Card.filled: no border
    /// - M3: Card.outlined: 1.0
    ///
    /// Warning: The Card variants cannot be themed separately in Flutter, if
    /// you provide a color, all card variants will share the same color.
    /// See issue: https://github.com/flutter/flutter/issues/153912
    final double? borderWidth,

    /// Card elevation.
    ///
    /// If not defined, defaults to:
    /// - M2: 1.0
    /// - M3: Card (elevated): 1.0
    /// - M3: Card.filled: 0.0
    /// - M3: Card.outlined: 0.0
    ///
    /// Warning: The Card variants cannot be themed separately in Flutter, if
    /// you provide an elevation, all Card variants will get same elevation.
    /// See issue: https://github.com/flutter/flutter/issues/153912
    final double? elevation,

    /// Overrides the default value for [Card.shadowColor].
    ///
    /// If null, [Card] defaults to fully opaque black.
    final Color? shadowColor,

    /// Overrides the default value for [Card.surfaceTintColor].
    ///
    /// If null, [Card] will not display an overlay color.
    ///
    /// See [Material.surfaceTintColor] for more details.
    final Color? surfaceTintColor,

    /// The clipBehavior of the card theme, defaults to
    /// [Clip.antiAlias] for smooth clipping when using rounded corners.
    ///
    /// There is no config property in [FlexSubThemesData] for [clipBehavior],
    /// if needed it can be exposed. Feel free to make a PR or submit an issue.
    final Clip clipBehavior = Clip.antiAlias,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _cardTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        radius: radius,
        borderSchemeColor: borderSchemeColor,
        borderWidth: borderWidth,
        elevation: elevation,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
        clipBehavior: clipBehavior,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [CheckboxThemeData] theme.
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The splashRadius is not used by FlexColorScheme sub-themes.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the checkbox.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used. This is more in-line
  /// with M3 design, but applied to M2 switch. The M3 color design
  /// specification for the secondary color, is a poor choice for toggles and
  /// switches, primary color works better.
  ///
  /// * [splashRadius]
  /// The splash radius of the circular Material ink response.
  ///
  /// Defaults to kRadialReactionRadius = 20.
  ///
  /// * [unselectedIsColored]
  /// Defines if unselected [Checkbox] is also themed to be [baseSchemeColor].
  ///
  /// If false, it is grey like in Flutter SDK.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static CheckboxThemeData checkboxTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the checkbox.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used. This is more in-line
    /// with M3 design, but applied to M2 switch. The M3 color design
    /// specification for the secondary color, is a poor choice for toggles and
    /// switches, primary color works better.
    final SchemeColor? baseSchemeColor,

    /// The splash radius of the circular Material ink response.
    ///
    /// Defaults to kRadialReactionRadius = 20.
    final double? splashRadius,

    /// Defines if unselected [Checkbox] is also themed to be [baseSchemeColor].
    ///
    /// If false, it is grey like in Flutter SDK.
    ///
    /// If undefined, defaults to false.
    final bool? unselectedIsColored,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _checkboxTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        splashRadius: splashRadius,
        unselectedIsColored: unselectedIsColored,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [ChipThemeData] theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [blendColors]
  /// Defines if the [baseSchemeColor] and [selectedSchemeColor] are
  /// alpha blended with the surface color.
  ///
  /// If not defined, defaults to false in Material-3 mode and to true
  /// in Material-2 mode.
  ///
  /// When true, the [baseSchemeColor] is alpha blended with the surface
  /// color using [kChipBackgroundAlphaBlend] alpha blend value.
  /// The [selectedSchemeColor] is alpha blended with the surface color
  /// using [kChipSelectedBackgroundAlphaBlend] alpha blend value.
  ///
  /// * [baseSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color the Chips
  /// use as their background base color.
  ///
  /// If not defined and [useMaterial3] is true, it defaults
  /// [SchemeColor.surface].
  ///
  /// If not defined and [useMaterial3] is false, it defaults
  /// [SchemeColor.primary] with a surface alpha blend of
  /// [kChipBackgroundAlphaBlend] applied, if [blendColors] is true,
  /// which it defaults to in Material-2 mode.
  ///
  /// * [selectedSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color the selected Chips
  /// use as their selected state color.
  ///
  /// The color scheme contrast pair color is used for text and icons, on the
  /// [selectedSchemeColor].
  ///
  /// If not defined and [useMaterial3] is true, defaults to
  /// [SchemeColor.secondaryContainer].
  ///
  /// If not defined and [useMaterial3] is false, defaults to
  /// [SchemeColor.secondaryContainer] if [blendColors] is false.
  /// If [blendColors] is true, defaults to [SchemeColor.primary] with
  /// a surface alpha blend of [kChipSelectedBackgroundAlphaBlend] applied.
  ///
  /// * [secondarySelectedSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color the selected
  /// ChoiceChips use as their selected state color.
  ///
  /// The color scheme contrast pair color is used for text and icons, on the
  /// [secondarySelectedSchemeColor]
  ///
  /// If not defined and [useMaterial3] is true, defaults to
  /// [selectedSchemeColor].
  ///
  /// * [deleteIconSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color the Chips
  /// use as color of the delete icon.
  ///
  /// The selected color is only used as base for the [Chip] colors, it also
  /// uses alpha blend and opacity to create the effective Chip colors using
  /// the selected scheme color as base.
  ///
  /// If not defined it defaults to effective theme based color from using
  /// [SchemeColor.onSurfaceVariant] same as Material-3 default.
  ///
  /// * [labelStyle]
  /// Overrides the default for [ChipAttributes.labelStyle],
  /// the style of the [DefaultTextStyle] that contains the
  /// chip's label.
  ///
  /// This only has an effect on label widgets that respect the
  /// [DefaultTextStyle], such as [Text].
  ///
  /// This property applies to [ActionChip], [Chip],
  /// [FilterChip], [InputChip], [RawChip].
  ///
  /// If not defined, the font size in the style defaults to 14.
  ///
  /// * [secondaryLabelStyle]
  /// Overrides the default for [ChoiceChip.labelStyle],
  /// the style of the [DefaultTextStyle] that contains the
  /// chip's label.
  ///
  /// This only has an effect on label widgets that respect the
  /// [DefaultTextStyle], such as [Text].
  ///
  /// If not defined, the font size in the style defaults to 14.
  ///
  /// * [fontSize]
  /// Font size of the [labelStyle].
  ///
  /// If defined, overrides the default font size used by either the
  /// default font of the default [labelStyle] or the font size of the
  /// passed in [labelStyle].
  ///
  /// If not defined the default text style font sizes are used, but if they
  /// did not have size defined, defaults 14.
  ///
  /// * [secondaryFontSize]
  /// Font size of the [secondaryLabelStyle].
  ///
  /// If defined, overrides the default font size used by either the
  /// default font of the default [secondaryLabelStyle] or the font size of
  /// the passed in [secondaryLabelStyle].
  ///
  /// If not defined, defaults to [fontSize].
  ///
  /// * [iconSize]
  /// Icon size used by the [IconTheme] used by [Chip]s.
  ///
  /// If not defined defaults to 18.
  ///
  /// * [padding]
  /// Overrides the default for [ChipAttributes.padding],
  /// the padding between the contents of the chip and the outside shape.
  ///
  /// This property applies to [ActionChip], [Chip], [ChoiceChip],
  /// [FilterChip], [InputChip], [RawChip].
  ///
  /// If not defined, defaults to EdgeInsets.symmetric(horizontal: 8) in
  /// Material mode and to EdgeInsets.symmetric(horizontal: 4) in
  /// Material2 mode.
  ///
  /// * [radius]
  /// Corner radius of the Chip.
  ///
  /// If not defined, defaults to [kChipRadius] 8dp,
  /// based on M3 Specification
  /// https://m3.material.io/components/chips/specs
  ///
  /// * [surfaceTintColor]
  /// Overrides the default for [ChipAttributes.surfaceTintColor], the
  /// Color of the chip's surface tint overlay when its elevation is
  /// greater than 0.
  ///
  /// This property applies to [ActionChip], [Chip], [ChoiceChip],
  /// [FilterChip], [InputChip], [RawChip].
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static ChipThemeData chipTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Defines if the [baseSchemeColor] and [selectedSchemeColor] are
    /// alpha blended with the surface color.
    ///
    /// If not defined, defaults to false in Material-3 mode and to true
    /// in Material-2 mode.
    ///
    /// When true, the [baseSchemeColor] is alpha blended with the surface
    /// color using [kChipBackgroundAlphaBlend] alpha blend value.
    /// The [selectedSchemeColor] is alpha blended with the surface color
    /// using [kChipSelectedBackgroundAlphaBlend] alpha blend value.
    final bool? blendColors,

    /// Defines which [Theme] based [ColorScheme] based color the Chips
    /// use as their background base color.
    ///
    /// If not defined and [useMaterial3] is true, it defaults
    /// [SchemeColor.surface].
    ///
    /// If not defined and [useMaterial3] is false, it defaults
    /// [SchemeColor.primary] with a surface alpha blend of
    /// [kChipBackgroundAlphaBlend] applied, if [blendColors] is true,
    /// which it defaults to in Material-2 mode.
    final SchemeColor? baseSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color the selected Chips
    /// use as their selected state color.
    ///
    /// The color scheme contrast pair color is used for text and icons, on the
    /// [selectedSchemeColor].
    ///
    /// If not defined and [useMaterial3] is true, defaults to
    /// [SchemeColor.secondaryContainer].
    ///
    /// If not defined and [useMaterial3] is false, defaults to
    /// [SchemeColor.secondaryContainer] if [blendColors] is false.
    /// If [blendColors] is true, defaults to [SchemeColor.primary] with
    /// a surface alpha blend of [kChipSelectedBackgroundAlphaBlend] applied.
    final SchemeColor? selectedSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color the selected
    /// ChoiceChips use as their selected state color.
    ///
    /// The color scheme contrast pair color is used for text and icons, on the
    /// [secondarySelectedSchemeColor]
    ///
    /// If not defined and [useMaterial3] is true, defaults to
    /// [selectedSchemeColor].
    final SchemeColor? secondarySelectedSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color the Chips
    /// use as color of the delete icon.
    ///
    /// The selected color is only used as base for the [Chip] colors, it also
    /// uses alpha blend and opacity to create the effective Chip colors using
    /// the selected scheme color as base.
    ///
    /// If not defined it defaults to effective theme based color from using
    /// [SchemeColor.onSurfaceVariant] same as Material-3 default.
    final SchemeColor? deleteIconSchemeColor,

    /// Overrides the default for [ChipAttributes.labelStyle],
    /// the style of the [DefaultTextStyle] that contains the
    /// chip's label.
    ///
    /// This only has an effect on label widgets that respect the
    /// [DefaultTextStyle], such as [Text].
    ///
    /// This property applies to [ActionChip], [Chip],
    /// [FilterChip], [InputChip], [RawChip].
    ///
    /// If not defined, the font size in the style defaults to 14.
    final TextStyle? labelStyle,

    /// Overrides the default for [ChoiceChip.labelStyle],
    /// the style of the [DefaultTextStyle] that contains the
    /// chip's label.
    ///
    /// This only has an effect on label widgets that respect the
    /// [DefaultTextStyle], such as [Text].
    ///
    /// If not defined, the font size in the style defaults to 14.
    final TextStyle? secondaryLabelStyle,

    /// Font size of the [labelStyle].
    ///
    /// If defined, overrides the default font size used by either the
    /// default font of the default [labelStyle] or the font size of the
    /// passed in [labelStyle].
    ///
    /// If not defined the default text style font sizes are used, but if they
    /// did not have size defined, defaults 14.
    final double? fontSize,

    /// Font size of the [secondaryLabelStyle].
    ///
    /// If defined, overrides the default font size used by either the
    /// default font of the default [secondaryLabelStyle] or the font size of
    /// the passed in [secondaryLabelStyle].
    ///
    /// If not defined, defaults to [fontSize].
    final double? secondaryFontSize,

    /// Icon size used by the [IconTheme] used by [Chip]s.
    ///
    /// If not defined defaults to 18.
    final double? iconSize,

    /// Overrides the default for [ChipAttributes.padding],
    /// the padding between the contents of the chip and the outside [shape].
    ///
    /// This property applies to [ActionChip], [Chip], [ChoiceChip],
    /// [FilterChip], [InputChip], [RawChip].
    ///
    /// If not defined, defaults to EdgeInsets.symmetric(horizontal: 8) in
    /// Material mode and to EdgeInsets.symmetric(horizontal: 4) in
    /// Material2 mode.
    final EdgeInsetsGeometry? padding,

    /// Corner radius of the Chip.
    ///
    /// If not defined, defaults to [kChipRadius] 8dp,
    /// based on M3 Specification
    /// https://m3.material.io/components/chips/specs
    final double? radius,

    /// Overrides the default for [ChipAttributes.surfaceTintColor], the
    /// Color of the chip's surface tint overlay when its elevation is
    /// greater than 0.
    ///
    /// This property applies to [ActionChip], [Chip], [ChoiceChip],
    /// [FilterChip], [InputChip], [RawChip].
    final Color? surfaceTintColor,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _chipTheme(
        colorScheme: colorScheme,
        blendColors: blendColors,
        baseSchemeColor: baseSchemeColor,
        selectedSchemeColor: selectedSchemeColor,
        secondarySelectedSchemeColor: secondarySelectedSchemeColor,
        deleteIconSchemeColor: deleteIconSchemeColor,
        labelStyle: labelStyle,
        secondaryLabelStyle: secondaryLabelStyle,
        fontSize: fontSize,
        secondaryFontSize: secondaryFontSize,
        iconSize: iconSize,
        padding: padding,
        radius: radius,
        surfaceTintColor: surfaceTintColor,
        useTintedDisable: useTintedDisable,
        useMaterial3: useMaterial3,
      );

  /// A slightly opinionated [DatePickerThemeData] helper for FlexColorScheme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundColor]
  /// Dialog background color.
  ///
  /// If null and [backgroundSchemeColor] is also null, then it
  /// gets default via Dialog's default null theme behavior,
  /// which is [ColorScheme.surfaceContainerHigh]
  /// in Material-3 mode and in Material-2 mode in light theme
  /// [Colors.white] and in a dark theme `Colors.shade.grey800`.
  ///
  /// If [backgroundSchemeColor] is defined, it will override any color
  /// give to [backgroundColor].
  ///
  /// Can be used to make a custom themed dialog with own background color,
  /// even after the ThemeData.dialogBackgroundColor property is
  /// is deprecated in Flutter SDK. See
  /// https://github.com/flutter/flutter/issues/91772).
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the dialog
  /// background color.
  ///
  /// If not defined, then the passed in [backgroundColor] will be used,
  /// which may be null too and dialog then falls back to Flutter SDK default
  /// value for DatePickerDialog, which is [ColorScheme.surfaceContainerHigh]
  /// in Material-3 mode and in Material-2 mode in light theme
  /// [Colors.white] and in a dark theme `Colors.grey.shade800`.
  ///
  /// * [dividerSchemeColor]
  /// The color of the divider in the [DatePickerDialog].
  ///
  /// If not defined, defaults to [ColorScheme.outlineVariant] in Material-3.
  /// In Material-2 the divider does not exist in the [DatePickerDialog]
  /// build.
  ///
  /// Use [SchemeColor.transparent] to remove the divider in Material-3.
  ///
  /// * [headerBackgroundSchemeColor]
  /// Defines the header's default background fill color.
  ///
  /// The dialog's header displays the currently selected date.
  ///
  /// Defaults to [ColorScheme.surfaceContainerHigh] in Material-3 and in
  /// Material-2 to [ColorScheme.primary] in light mode and to
  /// [ColorScheme.surface] in dark mode.
  ///
  /// * [headerForegroundSchemeColor]
  /// Defines the header's default color used for text labels and icons.
  ///
  /// The dialog's header displays the currently selected date.
  ///
  /// This is used instead of the [TextStyle.color] property of
  /// [headerHeadlineStyle] and [headerHelpStyle].
  ///
  /// If not defined, defaults to correct contrast pair for the used
  /// [headerBackgroundSchemeColor], with a preference to
  /// [SchemeColor.onSurfaceVariant] if any surface color is used as the
  /// background color.
  ///
  /// * [elevation]
  /// Dialog elevation.
  ///
  /// If not defined, defaults to [kDialogElevation] = 6.
  ///
  /// * [radius]
  /// Outer corner radius.
  ///
  /// If not defined, defaults to [kDialogRadius] 28dp,
  /// based on M3 Specification
  /// https://m3.material.io/components/dialogs/specs
  ///
  /// * [inputDecorationTheme]
  /// An input decoration theme, for the time picker.
  ///
  /// You would typically pass in one that matches the main used input
  /// decoration theme in order to get same input style with possible
  /// rounding used in the app otherwise on the input fields in the picker.
  ///
  /// It adds the custom overrides to the passed in decorator, that the widget
  /// does internally to the default null InputDecorationThemeData. There is
  /// no need to add those in the passed in InputDecorationThemeData, pass
  /// in your overall used app InputDecorationThemeData.
  ///
  /// * [useInputDecoratorTheme]
  /// Set to true to not use the provided [InputDecorationThemeData].
  ///
  /// If this flag is false, the provided [InputDecorationThemeData] is
  /// not used, additionally the theme fixes this theme helper does internally
  /// is not applied and pure null value is passed. This enables getting the
  /// default widget behavior input decorator, or opting in on getting the
  /// provided inputDecorationTheme with the internal style fix for issue
  /// https://github.com/flutter/flutter/issues/54104 applied automatically
  /// to the provided inputDecorationTheme.
  ///
  /// If not defined, defaults to false.
  ///
  /// * [shadowColor]
  /// Overrides the default value of [Dialog.shadowColor].
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value of [Dialog.surfaceTintColor].
  ///
  /// * [headerHeadlineStyle]
  /// Overrides the header's default headline text style.
  ///
  /// The dialog's header displays the currently selected date.
  ///
  /// The [TextStyle.color] of the [headerHeadlineStyle] is not used,
  /// [headerForegroundSchemeColor] is used instead.
  ///
  /// * [headerHelpStyle]
  /// Overrides the header's default help text style.
  ///
  /// The help text (also referred to as "supporting text" in the Material
  /// spec) is usually a prompt to the user at the top of the header
  /// (i.e. 'Select date').
  ///
  /// The [TextStyle.color] of the [headerHelpStyle] is not used,
  /// [headerForegroundSchemeColor] is used instead.
  ///
  /// See also:
  ///   [DatePickerDialog.helpText], which specifies the help text.
  ///
  /// * [weekdayStyle]
  /// Overrides the default text style used for the row of weekday
  /// labels at the top of the date picker grid.
  ///
  /// * [dayStyle]
  /// Overrides the default text style used for each individual day
  /// label in the grid of the date picker.
  ///
  /// The [TextStyle.color] of the [dayStyle] is not used,
  /// [dayForegroundColor] is used instead.
  ///
  /// * [dayForegroundColor]
  /// Overrides the default color used to paint the day labels in the
  /// grid of the date picker.
  ///
  /// This will be used instead of the color provided in [dayStyle].
  ///
  /// * [dayBackgroundColor]
  /// Overrides the default color used to paint the background of the
  /// day labels in the grid of the date picker.
  ///
  /// * [dayOverlayColor]
  /// Overrides the default highlight color that's typically used to
  /// indicate that a day in the grid is focused, hovered, or pressed.
  ///
  /// * [dayShape]
  /// Overrides the default shape used to paint the shape decoration of the
  /// day labels in the grid of the date picker.
  ///
  /// If the selected day is the current day, the provided shape with the
  /// value of [todayBackgroundColor] is used to paint the shape decoration of
  /// the day label and the value of [todayBorder] and [todayForegroundColor]
  /// is used to paint the border.
  ///
  /// If the selected day is not the current day, the provided shape with the
  /// value of [dayBackgroundColor] is used to paint the shape decoration of
  /// the day label.
  ///
  /// * [todayForegroundColor]
  /// Overrides the default color used to paint the
  /// [DatePickerDialog.currentDate] label in the grid of the dialog's
  /// [CalendarDatePicker] and the corresponding year in the dialog's
  /// [YearPicker].
  ///
  /// This will be used instead of the [TextStyle.color] provided in
  /// [dayStyle].
  ///
  /// * [todayBackgroundColor]
  /// Overrides the default color used to paint the background of the
  /// [DatePickerDialog.currentDate] label in the grid of the date picker.
  ///
  /// * [todayBorder]
  /// Overrides the border used to paint the
  /// [DatePickerDialog.currentDate] label in the grid of the date
  /// picker.
  ///
  /// The border side's [BorderSide.color] is not used,
  /// [todayForegroundColor] is used instead.
  ///
  /// * [yearStyle]
  /// Overrides the default text style used to paint each of the year
  /// entries in the year selector of the date picker.
  ///
  /// The [TextStyle.color] of the [yearStyle] is not used,
  /// [yearForegroundColor] is used instead.
  ///
  /// * [yearForegroundColor]
  /// Overrides the default color used to paint the year labels in the year
  /// selector of the date picker.
  ///
  /// This will be used instead of the color provided in [yearStyle].
  ///
  /// * [yearBackgroundColor]
  /// Overrides the default color used to paint the background of the
  /// year labels in the year selector of the of the date picker.
  ///
  /// * [yearOverlayColor]
  /// Overrides the default highlight color that's typically used to
  /// indicate that a year in the year selector is focused, hovered,
  /// or pressed.
  ///
  /// * [rangePickerBackgroundColor]
  /// Overrides the default [Scaffold.backgroundColor] for
  /// [DateRangePickerDialog].
  ///
  /// * [rangePickerElevation]
  /// Overrides the default elevation of the full screen
  /// [DateRangePickerDialog].
  ///
  /// * [rangePickerShadowColor]
  /// Overrides the color of the shadow painted below a full screen
  /// [DateRangePickerDialog].
  ///
  /// * [rangePickerShape]
  /// Overrides the default overall shape of a full screen
  /// [DateRangePickerDialog].
  ///
  /// If [elevation] is greater than zero then a shadow is shown and the
  /// shadow's shape mirrors the shape of the dialog.
  ///
  /// * [rangePickerHeaderBackgroundColor]
  /// Overrides the default background fill color for [DateRangePickerDialog].
  ///
  /// The dialog's header displays the currently selected date range.
  ///
  /// * [rangePickerHeaderForegroundColor]
  /// Overrides the default color used for text labels and icons in
  /// the header of a full screen [DateRangePickerDialog]
  ///
  /// The dialog's header displays the currently selected date range.
  ///
  /// This is used instead of any colors provided by
  /// [rangePickerHeaderHeadlineStyle] or [rangePickerHeaderHelpStyle].
  ///
  /// * [rangePickerHeaderHeadlineStyle]
  /// Overrides the default text style used for the headline text in
  /// the header of a full screen [DateRangePickerDialog].
  ///
  /// The dialog's header displays the currently selected date range.
  ///
  /// The [TextStyle.color] of [rangePickerHeaderHeadlineStyle] is not used,
  /// [rangePickerHeaderForegroundColor] is used instead.
  ///
  /// * [rangePickerHeaderHelpStyle]
  /// Overrides the default text style used for the help text of the
  /// header of a full screen [DateRangePickerDialog].
  ///
  /// The help text (also referred to as "supporting text" in the Material
  /// spec) is usually a prompt to the user at the top of the header
  /// (i.e. 'Select date').
  ///
  /// The [TextStyle.color] of the [rangePickerHeaderHelpStyle] is not used,
  /// [rangePickerHeaderForegroundColor] is used instead.
  ///
  /// * [rangeSelectionBackgroundColor]
  /// Overrides the default background color used to paint days
  /// selected between the start and end dates in a
  /// [DateRangePickerDialog].
  ///
  /// * [rangeSelectionOverlayColor]
  /// Overrides the default highlight color that's typically used to
  /// indicate that a date in the selected range of a
  /// [DateRangePickerDialog] is focused, hovered, or pressed.
  ///
  /// * [cancelButtonStyle]
  /// Overrides the default style of the cancel button of a
  /// [DatePickerDialog].
  ///
  /// * [confirmButtonStyle]
  /// Overrides the default style of the confirm (OK) button of a
  /// [DatePickerDialog].
  ///
  /// * [locale]
  /// An optional [locale] argument can be used to set the locale for the date
  /// picker. It defaults to the ambient locale provided by [Localizations].
  static DatePickerThemeData datePickerTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Dialog background color.
    ///
    /// If null and [backgroundSchemeColor] is also null, then it
    /// gets default via Dialog's default null theme behavior,
    /// which is [surfaceContainerHigh]
    /// in Material-3 mode and in Material-2 mode in light theme
    /// [Colors.white] and in a dark theme [Colors.grey800].
    ///
    /// If [backgroundSchemeColor] is defined, it will override any color
    /// give to [backgroundColor].
    ///
    /// Can be used to make a custom themed dialog with own background color,
    /// even after the [ThemeData.dialogBackgroundColor] property is
    /// is deprecated in Flutter SDK. See
    /// https://github.com/flutter/flutter/issues/91772).
    final Color? backgroundColor,

    /// Selects which color from the passed in colorScheme to use as the dialog
    /// background color.
    ///
    /// If not defined, then the passed in [backgroundColor] will be used,
    /// which may be null too and dialog then falls back to Flutter SDK default
    /// value for DatePickerDialog, which is [surfaceContainerHigh]
    /// in Material-3 mode and in Material-2 mode in light theme
    /// [Colors.white] and in a dark theme [Colors.grey800].
    final SchemeColor? backgroundSchemeColor,

    /// The color of the divider in the [DatePickerDialog].
    ///
    /// If not defined, defaults to [ColorScheme.outlineVariant] in Material-3.
    /// In Material-2 the divider does not exist in the [DatePickerDialog]
    /// build.
    ///
    /// Use [SchemeColor.transparent] to remove the divider in Material-3.
    final SchemeColor? dividerSchemeColor,

    /// Defines the header's default background fill color.
    ///
    /// The dialog's header displays the currently selected date.
    ///
    /// Defaults to [surfaceContainerHigh] in Material-3 and Material-2 mode
    /// to [primary] in light mode and to [surface] in dark mode.
    final SchemeColor? headerBackgroundSchemeColor,

    /// Defines the header's default color used for text labels and icons.
    ///
    /// The dialog's header displays the currently selected date.
    ///
    /// This is used instead of the [TextStyle.color] property of
    /// [headerHeadlineStyle] and [headerHelpStyle].
    ///
    /// If not defined, defaults to correct contrast pair for the used
    /// [headerBackgroundSchemeColor], with a preference to
    /// [SchemeColor.onSurfaceVariant] if any surface color is used as the
    /// background color.
    final SchemeColor? headerForegroundSchemeColor,

    /// Dialog elevation.
    ///
    /// If not defined, defaults to [kDialogElevation] = 6.
    final double? elevation,

    /// Outer corner radius.
    ///
    /// If not defined, defaults to [kDialogRadius] 28dp,
    /// based on M3 Specification
    /// https://m3.material.io/components/dialogs/specs
    final double? radius,

    /// An input decoration theme, for the time picker.
    ///
    /// You would typically pass in one that matches the main used input
    /// decoration theme in order to get same input style with possible
    /// rounding used in the app otherwise on the input fields in the picker.
    ///
    /// It adds the custom overrides to the passed in decorator, that the widget
    /// does internally to the default null InputDecorationThemeData. There is
    /// no need to add those in the passed in InputDecorationThemeData, pass
    /// in your overall used app InputDecorationThemeData.
    final InputDecorationThemeData? inputDecorationTheme,

    /// Set to true to not use the provided [InputDecorationThemeData].
    ///
    /// If this flag is false, the provided [InputDecorationThemeData] is
    /// not used, additionally the theme fixes this theme helper does internally
    /// is not applied and pure null value is passed. This enables getting the
    /// default widget behavior input decorator, or opting in on getting the
    /// provided inputDecorationTheme with the internal style fix for issue
    /// https://github.com/flutter/flutter/issues/54104 applied automatically
    /// to the provided inputDecorationTheme.
    ///
    /// If not defined, defaults to false.
    final bool? useInputDecoratorTheme,

    /// Overrides the default value of [Dialog.shadowColor].
    final Color? shadowColor,

    /// Overrides the default value of [Dialog.surfaceTintColor].
    final Color? surfaceTintColor,

    /// Overrides the header's default headline text style.
    ///
    /// The dialog's header displays the currently selected date.
    ///
    /// The [TextStyle.color] of the [headerHeadlineStyle] is not used,
    /// [headerForegroundColor] is used instead.
    final TextStyle? headerHeadlineStyle,

    /// Overrides the header's default help text style.
    ///
    /// The help text (also referred to as "supporting text" in the Material
    /// spec) is usually a prompt to the user at the top of the header
    /// (i.e. 'Select date').
    ///
    /// The [TextStyle.color] of the [headerHelpStyle] is not used,
    /// [headerForegroundColor] is used instead.
    ///
    /// See also:
    ///   [DatePickerDialog.helpText], which specifies the help text.
    final TextStyle? headerHelpStyle,

    /// Overrides the default text style used for the row of weekday
    /// labels at the top of the date picker grid.
    final TextStyle? weekdayStyle,

    /// Overrides the default text style used for each individual day
    /// label in the grid of the date picker.
    ///
    /// The [TextStyle.color] of the [dayStyle] is not used,
    /// [dayForegroundColor] is used instead.
    final TextStyle? dayStyle,

    /// Overrides the default color used to paint the day labels in the
    /// grid of the date picker.
    ///
    /// This will be used instead of the color provided in [dayStyle].
    final WidgetStateProperty<Color?>? dayForegroundColor,

    /// Overrides the default color used to paint the background of the
    /// day labels in the grid of the date picker.
    final WidgetStateProperty<Color?>? dayBackgroundColor,

    /// Overrides the default highlight color that's typically used to
    /// indicate that a day in the grid is focused, hovered, or pressed.
    final WidgetStateProperty<Color?>? dayOverlayColor,

    /// Overrides the default shape used to paint the shape decoration of the
    /// day labels in the grid of the date picker.
    ///
    /// If the selected day is the current day, the provided shape with the
    /// value of [todayBackgroundColor] is used to paint the shape decoration of
    /// the day label and the value of [todayBorder] and [todayForegroundColor]
    /// is used to paint the border.
    ///
    /// If the selected day is not the current day, the provided shape with the
    /// value of [dayBackgroundColor] is used to paint the shape decoration of
    /// the day label.
    final WidgetStateProperty<OutlinedBorder?>? dayShape,

    /// Overrides the default color used to paint the
    /// [DatePickerDialog.currentDate] label in the grid of the dialog's
    /// [CalendarDatePicker] and the corresponding year in the dialog's
    /// [YearPicker].
    ///
    /// This will be used instead of the [TextStyle.color] provided in
    /// [dayStyle].
    final WidgetStateProperty<Color?>? todayForegroundColor,

    /// Overrides the default color used to paint the background of the
    /// [DatePickerDialog.currentDate] label in the grid of the date picker.
    final WidgetStateProperty<Color?>? todayBackgroundColor,

    /// Overrides the border used to paint the
    /// [DatePickerDialog.currentDate] label in the grid of the date
    /// picker.
    ///
    /// The border side's [BorderSide.color] is not used,
    /// [todayForegroundColor] is used instead.
    final BorderSide? todayBorder,

    /// Overrides the default text style used to paint each of the year
    /// entries in the year selector of the date picker.
    ///
    /// The [TextStyle.color] of the [yearStyle] is not used,
    /// [yearForegroundColor] is used instead.
    final TextStyle? yearStyle,

    /// Overrides the default color used to paint the year labels in the year
    /// selector of the date picker.
    ///
    /// This will be used instead of the color provided in [yearStyle].
    final WidgetStateProperty<Color?>? yearForegroundColor,

    /// Overrides the default color used to paint the background of the
    /// year labels in the year selector of the of the date picker.
    final WidgetStateProperty<Color?>? yearBackgroundColor,

    /// Overrides the default highlight color that's typically used to
    /// indicate that a year in the year selector is focused, hovered,
    /// or pressed.
    final WidgetStateProperty<Color?>? yearOverlayColor,

    /// Overrides the default [Scaffold.backgroundColor] for
    /// [DateRangePickerDialog].
    final Color? rangePickerBackgroundColor,

    /// Overrides the default elevation of the full screen
    /// [DateRangePickerDialog].
    final double? rangePickerElevation,

    /// Overrides the color of the shadow painted below a full screen
    /// [DateRangePickerDialog].
    final Color? rangePickerShadowColor,

    /// Overrides the default overall shape of a full screen
    /// [DateRangePickerDialog].
    ///
    /// If [elevation] is greater than zero then a shadow is shown and the
    /// shadow's shape mirrors the shape of the dialog.
    final ShapeBorder? rangePickerShape,

    /// Overrides the default background fill color for [DateRangePickerDialog].
    ///
    /// The dialog's header displays the currently selected date range.
    final Color? rangePickerHeaderBackgroundColor,

    /// Overrides the default color used for text labels and icons in
    /// the header of a full screen [DateRangePickerDialog]
    ///
    /// The dialog's header displays the currently selected date range.
    ///
    /// This is used instead of any colors provided by
    /// [rangePickerHeaderHeadlineStyle] or [rangePickerHeaderHelpStyle].
    final Color? rangePickerHeaderForegroundColor,

    /// Overrides the default text style used for the headline text in
    /// the header of a full screen [DateRangePickerDialog].
    ///
    /// The dialog's header displays the currently selected date range.
    ///
    /// The [TextStyle.color] of [rangePickerHeaderHeadlineStyle] is not used,
    /// [rangePickerHeaderForegroundColor] is used instead.
    final TextStyle? rangePickerHeaderHeadlineStyle,

    /// Overrides the default text style used for the help text of the
    /// header of a full screen [DateRangePickerDialog].
    ///
    /// The help text (also referred to as "supporting text" in the Material
    /// spec) is usually a prompt to the user at the top of the header
    /// (i.e. 'Select date').
    ///
    /// The [TextStyle.color] of the [rangePickerHeaderHelpStyle] is not used,
    /// [rangePickerHeaderForegroundColor] is used instead.
    final TextStyle? rangePickerHeaderHelpStyle,

    /// Overrides the default background color used to paint days
    /// selected between the start and end dates in a
    /// [DateRangePickerDialog].
    final Color? rangeSelectionBackgroundColor,

    /// Overrides the default highlight color that's typically used to
    /// indicate that a date in the selected range of a
    /// [DateRangePickerDialog] is focused, hovered, or pressed.
    final WidgetStateProperty<Color?>? rangeSelectionOverlayColor,

    /// Overrides the default style of the cancel button of a
    /// [DatePickerDialog].
    final ButtonStyle? cancelButtonStyle,

    /// Overrides the default style of the confirm (OK) button of a
    /// [DatePickerDialog].
    final ButtonStyle? confirmButtonStyle,

    /// An optional [locale] argument can be used to set the locale for the date
    /// picker. It defaults to the ambient locale provided by [Localizations].
    final Locale? locale,
  }) =>
      _datePickerTheme(
        colorScheme: colorScheme,
        backgroundColor: backgroundColor,
        backgroundSchemeColor: backgroundSchemeColor,
        dividerSchemeColor: dividerSchemeColor,
        headerBackgroundSchemeColor: headerBackgroundSchemeColor,
        headerForegroundSchemeColor: headerForegroundSchemeColor,
        elevation: elevation,
        radius: radius,
        inputDecorationTheme: inputDecorationTheme,
        useInputDecoratorTheme: useInputDecoratorTheme,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
        headerHeadlineStyle: headerHeadlineStyle,
        headerHelpStyle: headerHelpStyle,
        weekdayStyle: weekdayStyle,
        dayStyle: dayStyle,
        dayForegroundColor: dayForegroundColor,
        dayBackgroundColor: dayBackgroundColor,
        dayOverlayColor: dayOverlayColor,
        dayShape: dayShape,
        todayForegroundColor: todayForegroundColor,
        todayBackgroundColor: todayBackgroundColor,
        todayBorder: todayBorder,
        yearStyle: yearStyle,
        yearForegroundColor: yearForegroundColor,
        yearBackgroundColor: yearBackgroundColor,
        yearOverlayColor: yearOverlayColor,
        rangePickerBackgroundColor: rangePickerBackgroundColor,
        rangePickerElevation: rangePickerElevation,
        rangePickerShadowColor: rangePickerShadowColor,
        rangePickerShape: rangePickerShape,
        rangePickerHeaderBackgroundColor: rangePickerHeaderBackgroundColor,
        rangePickerHeaderForegroundColor: rangePickerHeaderForegroundColor,
        rangePickerHeaderHeadlineStyle: rangePickerHeaderHeadlineStyle,
        rangePickerHeaderHelpStyle: rangePickerHeaderHelpStyle,
        rangeSelectionBackgroundColor: rangeSelectionBackgroundColor,
        rangeSelectionOverlayColor: rangeSelectionOverlayColor,
        cancelButtonStyle: cancelButtonStyle,
        confirmButtonStyle: confirmButtonStyle,
        locale: locale,
      );

  /// An opinionated [DialogThemeData] with custom corner radius and elevation.
  ///
  /// Corner [radius] defaults to [kDialogRadius] = 28 and [elevation] to
  /// [kDialogElevation] = 10.
  ///
  /// The default radius follows Material M3 guide
  /// [specification](https://m3.material.io/components/dialogs/specs).
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Dialog background color.
  ///
  /// If null and [backgroundSchemeColor] is also null, then it
  /// gets default via Dialog's default null theme behavior.
  ///
  /// If [backgroundSchemeColor] is defined, it will override any color
  /// passed in here.
  ///
  /// Can be used to make a custom themed dialog with own background color,
  /// even after the `ThemeData.dialogBackgroundColor` property is
  /// is deprecated in Flutter SDK. See
  /// https://github.com/flutter/flutter/issues/91772)
  ///
  /// * [backgroundColor]
  /// Dialog background color.
  ///
  /// If null and [backgroundSchemeColor] is also null, then it
  /// gets default via Dialog's default null theme behavior.
  ///
  /// If [backgroundSchemeColor] is defined, it will override any color
  /// passed in here.
  ///
  /// Can be used to make a custom themed dialog with own background color,
  /// even after the `ThemeData.dialogBackgroundColor` property is
  /// is deprecated in Flutter SDK. See
  /// https://github.com/flutter/flutter/issues/91772)
  ///
  /// * [elevation]
  /// Dialog elevation.
  ///
  /// If not defined, defaults to [kDialogElevation] = 6.
  ///
  /// * [shadowColor]
  /// Dialog shadow color.
  ///
  /// * [surfaceTintColor]
  /// Dialog surface tint color.
  ///
  /// * [radius]
  /// Corner radius of the [Dialog] dialog.
  ///
  /// If not defined, defaults to [kDialogRadius] = 28.
  ///
  /// * [actionsPadding]
  /// The padding of the actions in the dialog.
  ///
  /// * [titleTextStyle]
  /// The text style of the title.
  ///
  /// * [contentTextStyle]
  /// The text style of the content.
  static DialogThemeData dialogTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    final ColorScheme? colorScheme,

    /// Dialog background color.
    ///
    /// If null and [backgroundSchemeColor] is also null, then it
    /// gets default via Dialog's default null theme behavior.
    ///
    /// If [backgroundSchemeColor] is defined, it will override any color
    /// passed in here.
    ///
    /// Can be used to make a custom themed dialog with own background color,
    /// even after the [ThemeData.dialogBackgroundColor] property is
    /// is deprecated in Flutter SDK. See
    /// https://github.com/flutter/flutter/issues/91772)
    final SchemeColor? backgroundSchemeColor,

    /// Dialog background color.
    ///
    /// If null and [backgroundSchemeColor] is also null, then it
    /// gets default via Dialog's default null theme behavior.
    ///
    /// If [backgroundSchemeColor] is defined, it will override any color
    /// passed in here.
    ///
    /// Can be used to make a custom themed dialog with own background color,
    /// even after the [ThemeData.dialogBackgroundColor] property is
    /// is deprecated in Flutter SDK. See
    /// https://github.com/flutter/flutter/issues/91772)
    final Color? backgroundColor,

    /// Dialog elevation.
    ///
    /// If not defined, defaults to [kDialogElevation] = 6.
    final double? elevation,

    /// Dialog shadow color.
    final Color? shadowColor,

    /// Dialog surface tint color.
    final Color? surfaceTintColor,

    /// Corner radius of the [Dialog] dialog.
    ///
    /// If not defined, defaults to [kDialogRadius] = 28.
    final double? radius,

    /// The padding of the actions in the dialog.
    final EdgeInsetsGeometry? actionsPadding,

    /// The text style of the title.
    final TextStyle? titleTextStyle,

    /// The text style of the content.
    final TextStyle? contentTextStyle,
  }) =>
      _dialogTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        backgroundColor: backgroundColor,
        elevation: elevation,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
        radius: radius,
        actionsPadding: actionsPadding,
        titleTextStyle: titleTextStyle,
        contentTextStyle: contentTextStyle,
      );

  /// An opinionated [DrawerThemeData] theme for the [Drawer].
  ///
  /// The [NavigationDrawer] also uses these value for its drawer parts. Its
  /// menu part has an own theme in Flutter SDK.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in [colorScheme] to use as
  /// [Drawer] background color.
  ///
  /// If not defined, defaults to [SchemeColor.surfaceContainerLow].
  ///
  /// Flutter SDK uses surfaceContainerLow color as default in M3 and
  /// ThemeData's canvasColor in M2 mode, which is Colors.grey[50] in
  /// light mode and Colors.grey[850] in dark mode.
  ///
  /// * [radius]
  /// Corner radius of the [Drawer]'s visible edge.
  ///
  /// If not defined, defaults to [kDrawerRadius] 16 dp in M2 mode,
  /// in M3 mode, null is kept but gets 16 via M3 mode defaults.
  /// The 16 dp values is based on M3 specification:
  /// https://m3.material.io/components/navigation-drawer/specs
  ///
  /// * [elevation]
  /// Drawer elevation.
  ///
  /// If not defined, defaults to Flutter default values, in M2 mode (16)
  /// and in M3 (1) via SDK defaults.
  ///
  /// * [shadowColor]
  /// Drawer elevation shadow color.
  ///
  /// In M2 defaults to [Colors.black] and elevation casts a shadow.
  /// In M3 it defaults [Colors.transparent] and there is no shadow.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for [Drawer.surfaceTintColor].
  ///
  /// * [width]
  /// Themes the default width of the [Drawer].
  ///
  /// If not defined, defaults to 304dp via Flutter SDK defaults for both
  /// M2 and M3.
  ///
  /// M3 spec has it at 360dp for [NavigationDrawer], but
  /// Flutter still uses 304dp as default in M3 mode.
  ///
  /// For more info see issue:
  /// https://github.com/flutter/flutter/issues/123380
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static DrawerThemeData drawerTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in [colorScheme] to use as
    /// [Drawer] background color.
    ///
    /// If not defined, defaults to [SchemeColor.surfaceContainerLow].
    ///
    /// Flutter SDK uses surfaceContainerLow color as default in M3 and
    /// ThemeData's canvasColor in M2 mode, which is Colors.grey[50] in
    /// light mode and Colors.grey[850] in dark mode.
    final SchemeColor? backgroundSchemeColor,

    /// Corner radius of the [Drawer]'s visible edge.
    ///
    /// If not defined, defaults to [kDrawerRadius] 16 dp in M2 mode,
    /// in M3 mode, null is kept but gets 16 via M3 mode defaults.
    /// The 16 dp values is based on M3 specification:
    /// https://m3.material.io/components/navigation-drawer/specs
    final double? radius,

    /// Drawer elevation.
    ///
    /// If not defined, defaults to Flutter default values, in M2 mode (16)
    /// and in M3 (1) via SDK defaults.
    final double? elevation,

    /// Drawer elevation shadow color.
    ///
    /// In M2 defaults to [Colors.black] and elevation casts a shadow.
    /// In M3 it defaults [Colors.transparent] and there is no shadow.
    final Color? shadowColor,

    /// Overrides the default value for [Drawer.surfaceTintColor].
    final Color? surfaceTintColor,

    /// Themes the default width of the [Drawer].
    ///
    /// If not defined, defaults to 304dp via Flutter SDK defaults for both
    /// M2 and M3.
    ///
    /// M3 spec has it at 360dp for [NavigationDrawer], but
    /// Flutter still uses 304dp as default in M3 mode.
    ///
    /// For more info see issue:
    /// https://github.com/flutter/flutter/issues/123380
    final double? width,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _drawerTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        radius: radius,
        elevation: elevation,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
        width: width,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [DropdownMenuThemeData] theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [textStyle]
  /// The [TextStyle] of the text entry in a [DropdownMenu].
  ///
  /// If not defined, defaults to Flutter SDK default via widget default
  /// [TextTheme.labelLarge].
  ///
  /// * [inputDecorationTheme]
  /// An [InputDecorationThemeData] for the text input part of
  /// the [DropdownMenu].
  ///
  /// Typically you want it to match the input decorator on your TextField.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for [DropdownMenuThemeData.menuStyle] and its
  /// `surfaceTintColor`.
  ///
  /// * [maximumSize]
  /// The maximum size of the dropdown menu itself.
  ///
  /// A [Size.infinite] or null value for this property means that the menu's
  /// maximum size is not constrained.
  ///
  /// This value must be greater than or equal to `minimumSize`.
  ///
  /// If not defined, this property temporarily defaults to
  /// `WidgetStatePropertyAll<Size>(Size.infinite)`. This default fallback is
  /// added to avoid a breaking style bug in Flutter SDK 3.32.0 and later,
  /// at least up to 3.35.1 and maybe later versions too.
  /// It is a temporary fix for this issue
  /// https://github.com/flutter/flutter/issues/170970 and it will be
  /// removed in a future release when
  /// this PR fix https://github.com/flutter/flutter/pull/169438
  /// has landed in the stable Flutter release. It has landed in master, but
  /// not yet in Flutter 3.35.1.
  static DropdownMenuThemeData dropdownMenuTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// The [TextStyle] of the text entry in a [DropdownMenu].
    ///
    /// If not defined, defaults to Flutter SDK default via widget default
    /// [TextTheme.labelLarge].
    final TextStyle? textStyle,

    /// An [InputDecorationThemeData] for the text input part of
    /// the [DropdownMenu].
    ///
    /// Typically you want it to match the input decorator on your TextField.
    final InputDecorationThemeData? inputDecorationTheme,

    /// Overrides the default value for DropdownMenuThemeData
    /// [menuStyle.surfaceTintColor].
    final Color? surfaceTintColor,

    // TODO(rydmike): Remove maximumSize fallback when fixed in Flutter SDK.
    /// The maximum size of the dropdown menu itself.
    ///
    /// A [Size.infinite] or null value for this property means that the menu's
    /// maximum size is not constrained.
    ///
    /// This value must be greater than or equal to `minimumSize`.
    ///
    /// If not defined, this property temporarily defaults to
    /// `WidgetStatePropertyAll<Size>(Size.infinite)`. This default fallback is
    /// added to avoid a breaking style bug in Flutter SDK 3.32.0 and later,
    /// at least up to 3.35.1 and maybe later versions too.
    /// It is a temporary fix for this issue
    /// https://github.com/flutter/flutter/issues/170970 and it will be
    /// removed in a future release when
    /// this PR fix https://github.com/flutter/flutter/pull/169438
    /// has landed in the stable Flutter release. It has landed in master, but
    /// not yet in Flutter 3.35.1.
    final WidgetStateProperty<Size?>? maximumSize,
  }) =>
      _dropdownMenuTheme(
        colorScheme: colorScheme,
        textStyle: textStyle,
        inputDecorationTheme: inputDecorationTheme,
        surfaceTintColor: surfaceTintColor,
        maximumSize: maximumSize,
      );

  /// An opinionated [ElevatedButtonThemeData] theme.
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The button [elevation] defaults to 1 [kElevatedButtonElevation], making
  /// the elevated button a bit more flat. Flutter SDK ElevatedButton
  /// defaults to elevation 2.
  ///
  /// The adjustable button corner [radius] defaults to 20. This is the new
  /// default in M3, Flutter SDK M2 defaults to 4.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the button.
  ///
  /// If [useMaterial3] is false, the [baseSchemeColor] is used as button
  /// background color in M2 style, and if it is true, it is used as the
  /// button foreground color for text and icon.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [onBaseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// secondary color, or on color for for the button.
  ///
  /// If [useMaterial3] is false, the [onBaseSchemeColor] is used as button
  /// foreground color in M2 style, and if it is true, it is used as the
  /// button background color..
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, the [baseSchemeColor] on color will be used if
  /// [useMaterial3] is false, if it is true, then
  /// [ColorScheme.surfaceContainerLow] will be used.
  ///
  /// * [radius]
  /// The button corner radius.
  ///
  /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
  /// M3 it defaults to Stadium border based on
  /// https://m3.material.io/components/buttons/specs
  ///
  /// * [elevation]
  /// The button elevation.
  ///
  /// If null and passed in [useMaterial3] is false then it defaults to using
  /// [kElevatedButtonElevation] 1 with [ElevatedButton.styleFrom], making it
  /// a bit more flat in its elevation state than Flutter M2, that defaults
  /// to 2.
  ///
  /// If null and passed in [useMaterial3] is true, then it defaults to using
  /// the M3 elevation defaults by keeping elevation null and using default
  /// M3 elevated button style. This requires that the ambient theme also uses
  /// Material 3.
  ///
  /// If a value is passed in, the [ElevatedButton.styleFrom] constructor used
  /// for M2 style elevation is used with the passed in value in M2 mode. In
  /// M3 the given elevation value is used as baseline, with M3 state
  /// modifiers, this means disabled is fat, zero elevation, and pressed is
  /// elevation + 2, other states are at given elevation.
  ///
  /// * [padding]
  /// Padding for the button theme.
  ///
  /// Defaults to null and uses `styleFrom` constructors default padding.
  ///
  /// M3 has more horizontal padding 24dp, but the tighter default padding
  /// in M2 that is 16dp looks fine as well when using stadium borders
  /// as in M3.
  ///
  /// If null and [useMaterial3] is true in the context, the correct M3
  /// button theme default computed button padding for M3 will be used.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If null, defaults to [kButtonMinSize] (`const Size(64.0, 40.0)`) when
  /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
  /// [useMaterial3] is true.
  ///
  /// * [textStyle]
  /// The style for the button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// foreground color is used instead.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashFactory]
  /// Creates the [InkWell] splash factory, which defines the appearance of
  /// "ink" splashes that occur in response to taps.
  ///
  /// In M2 mode FlexColorScheme passes in the effective splashFactory
  /// from splashFactory override value or the result from
  /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
  /// null and the default comes via ThemeData.splashFactory, that is has
  /// also defined.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static ElevatedButtonThemeData elevatedButtonTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the button.
    ///
    /// If [useMaterial3] is false, the [baseSchemeColor] is used as button
    /// background color in M2 style, and if it is true, it is used as the
    /// button foreground color for text and icon.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? baseSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// secondary color, or on color for for the button.
    ///
    /// If [useMaterial3] is false, the [onBaseSchemeColor] is used as button
    /// foreground color in M2 style, and if it is true, it is used as the
    /// button background color..
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, the [baseSchemeColor] on color will be used if
    /// [useMaterial3] is false, if it is true, then
    /// [ColorScheme.surfaceContainerLow] will be used.
    final SchemeColor? onBaseSchemeColor,

    /// The button corner radius.
    ///
    /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
    /// M3 it defaults to Stadium border based on
    /// https://m3.material.io/components/buttons/specs
    final double? radius,

    /// The button elevation.
    ///
    /// If null and passed in [useMaterial3] is false then it defaults to using
    /// [kElevatedButtonElevation] 1 with [ElevatedButton.styleFrom], making it
    /// a bit more flat in its elevation state than Flutter M2, that defaults
    /// to 2.
    ///
    /// If null and passed in [useMaterial3] is true, then it defaults to using
    /// the M3 elevation defaults by keeping elevation null and using default
    /// M3 elevated button style. This requires that the ambient theme also uses
    /// Material 3.
    ///
    /// If a value is passed in, the [ElevatedButton.styleFrom] constructor used
    /// for M2 style elevation is used with the passed in value in M2 mode. In
    /// M3 the given elevation value is used as baseline, with M3 state
    /// modifiers, this means disabled is fat, zero elevation, and pressed is
    /// elevation + 2, other states are at given elevation.
    final double? elevation,

    /// Padding for the button theme.
    ///
    /// Defaults to null and uses `styleFrom` constructors default padding.
    ///
    /// M3 has more horizontal padding 24dp, but the tighter default padding
    /// in M2 that is 16dp looks fine as well when using stadium borders
    /// as in M3.
    ///
    /// If null and [useMaterial3] is true in the context, the correct M3
    /// button theme default computed button padding for M3 will be used.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If null, defaults to [kButtonMinSize] (`const Size(64.0, 40.0)`) when
    /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
    /// [useMaterial3] is true.
    final Size? minButtonSize,

    /// The style for the button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// foreground color is used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Creates the [InkWell] splash factory, which defines the appearance of
    /// "ink" splashes that occur in response to taps.
    ///
    /// In M2 mode FlexColorScheme passes in the effective splashFactory
    /// from splashFactory override value or the result from
    /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
    /// null and the default comes via ThemeData.splashFactory, that is has
    /// also defined.
    final InteractiveInkFeatureFactory? splashFactory,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _elevatedButtonTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        onBaseSchemeColor: onBaseSchemeColor,
        radius: radius,
        elevation: elevation,
        padding: padding,
        minButtonSize: minButtonSize,
        textStyle: textStyle,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        splashFactory: splashFactory,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [FilledButtonThemeData] theme.
  ///
  /// Requires a [ColorScheme], the color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The adjustable button corner [radius] defaults to Stadium in M3, and FCS
  /// uses 20 in M2, where SDK M2 defaults to 4.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// background  color for the filled button.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// The foreground color automatically uses the contrast complementary color
  /// from the SchemeColor.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [radius]
  /// If not defined, defaults to Stadium border based on
  /// https://m3.material.io/components/buttons/specs
  ///
  /// * [padding]
  /// Padding for the button theme.
  ///
  /// Defaults to null and uses `styleFrom` constructors default padding.
  ///
  /// M3 has more horizontal padding 24dp, but the tighter default padding
  /// in M2 that is 16dp looks fine as well when using stadium borders
  /// as in M3.
  ///
  /// If null and [useMaterial3] is true in the context, the correct M3
  /// button theme default computed button padding for M3 will be used.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
  /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
  /// [useMaterial3] is true, via M3 built in defaults.
  ///
  /// * [textStyle]
  /// The style for the button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// foreground color is used instead.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashFactory]
  /// Creates the [InkWell] splash factory, which defines the appearance of
  /// "ink" splashes that occur in response to taps.
  ///
  /// In M2 mode FlexColorScheme passes in the effective splashFactory
  /// from splashFactory override value or the result from
  /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
  /// null and the default comes via ThemeData.splashFactory, that is has
  /// also defined.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static FilledButtonThemeData filledButtonTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the
    /// background  color for the filled button.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// The foreground color automatically uses the contrast complementary color
    /// from the SchemeColor.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? backgroundSchemeColor,

    /// If not defined, defaults to Stadium border based on
    /// https://m3.material.io/components/buttons/specs
    final double? radius,

    /// Padding for the button theme.
    ///
    /// Defaults to null and uses `styleFrom` constructors default padding.
    ///
    /// M3 has more horizontal padding 24dp, but the tighter default padding
    /// in M2 that is 16dp looks fine as well when using stadium borders
    /// as in M3.
    ///
    /// If null and [useMaterial3] is true in the context, the correct M3
    /// button theme default computed button padding for M3 will be used.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
    /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
    /// [useMaterial3] is true, via M3 built in defaults.
    final Size? minButtonSize,

    /// The style for the button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// [foregroundColor] is used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Creates the [InkWell] splash factory, which defines the appearance of
    /// "ink" splashes that occur in response to taps.
    ///
    /// In M2 mode FlexColorScheme passes in the effective splashFactory
    /// from splashFactory override value or the result from
    /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
    /// null and the default comes via ThemeData.splashFactory, that is has
    /// also defined.
    final InteractiveInkFeatureFactory? splashFactory,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _filledButtonTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        radius: radius,
        padding: padding,
        minButtonSize: minButtonSize,
        textStyle: textStyle,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        splashFactory: splashFactory,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [FloatingActionButtonThemeData] with custom border radius.
  ///
  /// The border radius defaults to [kFabRadius] = 16, the new M3 default.
  /// https://m3.material.io/components/floating-action-button/specs for the
  /// standard sized FAB.
  ///
  /// By setting [useShape] to false, it is possible to opt out of all
  /// shape theming on FABs and keep their defaults, while still eg.
  /// keeping M3 defaults on other widgets or changing their border radius
  /// with the shared global value.
  ///
  /// You may want to continue to keep the FAB circular and extended FAB stadium
  /// (pill) shaped as before, despite otherwise using a rounder or M3 design.
  /// The circular M2 FAB goes well with those designs too and is more familiar.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the floating action button background color.
  ///
  /// If not defined, then if [useMaterial3] `colorScheme.secondary` will
  /// be. If [useMaterial3] is true, then `colorScheme.primaryContainer`
  /// will be used.
  ///
  /// The foreground color automatically uses the selected background
  /// color's contrast color pair in the passed in [colorScheme] property.
  ///
  /// * [foregroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the floating action button foreground color.
  ///
  /// If not defined, effective default is the complement color to used
  /// [backgroundSchemeColor].
  ///
  /// * [radius]
  /// Corner radius of the [FloatingActionButton].
  ///
  /// If not defined, defaults to [kFabRadius] 16dp,
  /// based on M3 Specification
  /// https://m3.material.io/components/floating-action-button/specs
  ///
  /// * [useShape]
  /// Set to false to not apply any Shape theming to the FAB.
  ///
  /// If set to false, the Shape property will be kept null, regardless
  /// of what border radius was given, also via `alwaysCircular` property.
  /// This results in that the FAB theme data, will use and implement its
  /// Flutter SDK default shape behavior. Other properties are still used.
  ///
  /// Default to true.
  ///
  /// * [alwaysCircular]
  /// Set to true to always use circular and stadium shapes on the FAB.
  ///
  /// If set to true, it overrides `radius` and shape is always circular
  /// or stadium shaped.
  ///
  /// Implementation is via `StadiumBorder` to be able
  /// to support the extended FAB as well. It looks same with Stadium on
  /// the circular cases as the actual Circular FAB using ones in M2, but
  /// implementation is different since we cannot use different themed
  /// shapes for different types of FAB, like the hard coded default
  /// none themed behavior does. See issue
  /// [#107946](https://github.com/flutter/flutter/issues/107946) for
  /// more information.
  ///
  /// Has no impact if `useShape` is false.
  ///
  /// Defaults to false.
  ///
  /// * [extendedTextStyle]
  /// The text style for an extended [FloatingActionButton]'s label.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static FloatingActionButtonThemeData floatingActionButtonTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the floating action button background color.
    ///
    /// If not defined, then if [useMaterial3] `colorScheme.secondary` will
    /// be. If [useMaterial3] is true, then `colorScheme.primaryContainer`
    /// will be used.
    ///
    /// The foreground color automatically uses the selected background
    /// color's contrast color pair in the passed in [colorScheme] property.
    final SchemeColor? backgroundSchemeColor,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the floating action button foreground color.
    ///
    /// If not defined, effective default is the complement color to used
    /// [backgroundSchemeColor].
    final SchemeColor? foregroundSchemeColor,

    /// Corner radius of the [FloatingActionButton].
    ///
    /// If not defined, defaults to [kFabRadius] 16dp,
    /// based on M3 Specification
    /// https://m3.material.io/components/floating-action-button/specs
    final double? radius,

    /// Set to false to not apply any Shape theming to the FAB.
    ///
    /// If set to false, the Shape property will be kept null, regardless
    /// of what border radius was given, also via `alwaysCircular` property.
    /// This results in that the FAB theme data, will use and implement its
    /// Flutter SDK default shape behavior. Other properties are still used.
    ///
    /// Default to true.
    final bool useShape = true,

    /// Set to true to always use circular and stadium shapes on the FAB.
    ///
    /// If set to true, it overrides `radius` and shape is always circular
    /// or stadium shaped.
    ///
    /// Implementation is via `StadiumBorder` to be able
    /// to support the extended FAB as well. It looks same with Stadium on
    /// the circular cases as the actual Circular FAB using ones in M2, but
    /// implementation is different since we cannot use different themed
    /// shapes for different types of FAB, like the hard coded default
    /// none themed behavior does. See issue
    /// [#107946](https://github.com/flutter/flutter/issues/107946) for
    /// more information.
    ///
    /// Has no impact if `useShape` is false.
    ///
    /// Defaults to false.
    final bool alwaysCircular = false,

    /// The text style for an extended [FloatingActionButton]'s label.
    final TextStyle? extendedTextStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _floatingActionButtonTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        foregroundSchemeColor: foregroundSchemeColor,
        radius: radius,
        useShape: useShape,
        alwaysCircular: alwaysCircular,
        extendedTextStyle: extendedTextStyle,
        useTintedInteraction: useTintedInteraction,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [IconButtonThemeData].
  ///
  /// Current only used to set tinted interaction and disable style on
  /// [IconButtonThemeData] when these feature are opted in on in FCS.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  static IconButtonThemeData iconButtonTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,
  }) =>
      _iconButtonTheme(
        colorScheme: colorScheme,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
      );

  /// An opinionated [InputDecorationThemeData], with optional fill color and
  /// adjustable corner radius.
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color
  /// scheme would typically be equal the color scheme also used to define the
  /// color scheme for your app theme.
  ///
  /// Comes with many parameters to adjust the style of the input decorator.
  /// For example the the corner [radius] can be adjusted. In Material 2 mode
  /// it defaults to [kInputDecoratorRadius] which is 16, in Material 3 mode it
  /// defaults to [kInputDecoratorM3Radius] which is 4, following the Material
  /// 3 design specification.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [textTheme]
  /// Optional provided effective TextTheme to use as base for the
  /// input decorations.
  ///
  /// A default one is used if not provided.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use for the border
  /// and fill color of the input decorator.
  ///
  /// If not defined, in M3 mode border color defaults to primary and fill
  /// color to surfaceContainerHighest. In M2 mode border and fill color both
  /// default to primary.
  ///
  /// The border [borderSchemeColor] can be used to define the
  /// border color separately. It defaults to this color, if
  /// [borderSchemeColor] is not defined, and this color is.
  ///
  /// * [radius]
  /// The decorated input fields corner border radius.
  ///
  /// If not defined, in Material-2 mode defaults to [kInputDecoratorRadius]
  /// which is 16, in Material-3 mode it defaults to
  /// [kInputDecoratorM3Radius] which is 4, following the Material
  /// 3 design specification.
  ///
  /// * [borderType]
  /// Selects input border type.
  ///
  /// If undefined, defaults to [FlexInputBorderType.underline].
  /// The underline style is default in Flutter SDK defaults too.
  ///
  /// * [contentPadding]
  /// The padding for the input decoration's container.
  ///
  /// The decoration's container is the area which is filled if
  /// [InputDecoration.filled] is true and bordered per the border.
  /// It's the area adjacent to [InputDecoration.icon] and above the
  /// [InputDecoration.icon] and above the widgets that contain
  /// [InputDecoration.helperText], [InputDecoration.errorText], and
  /// [InputDecoration.counterText].
  ///
  /// By default the [contentPadding] reflects [isDense] and the type of the
  /// border. If `isCollapsed` is true then [contentPadding] is
  /// [EdgeInsets.zero].
  ///
  /// When [isDense] is true, the content padding can be made smaller and
  /// tighter than when it is false.
  ///
  /// If no [contentPadding] is given, Flutter SDK uses default padding values
  /// that depends on if [isDense] is true or false and if we use outline or
  /// underline border.
  ///
  /// * [isDense]
  /// Whether the input decorator's child is part of a dense form (i.e., uses
  /// less vertical space).
  ///
  /// Defaults to false.
  ///
  /// * [filled]
  /// If true the decoration's container is filled with [fillColor].
  ///
  /// Typically this field set to true if border is an
  /// [UnderlineInputBorder].
  ///
  /// The decoration's container is the area, defined by the border's
  /// [InputBorder.getOuterPath], which is filled if [filled] is
  /// true and bordered per the border.
  ///
  /// Defaults to false, like Flutter SDK does. Filled is nicer, try it.
  ///
  /// * [fillColor]
  /// An optional totally custom fill color used to fill the
  /// `InputDecorator` background with, when `filled` is true.
  ///
  /// If null, defaults to color scheme color defined by `baseColor`
  /// withAlpha(0x0D) (5%) if color scheme is light and withAlpha(0x14) (8%)
  /// if color scheme is dark.
  ///
  /// * [backgroundAlpha]
  /// Defines the alpha, opacity channel value used as opacity on effective
  /// [InputDecorator] background color.
  ///
  /// If defined, the valid range is 0 to 255 (0x00 to 0xFF), if out of bounds
  /// it is capped to closest valid value.
  ///
  /// If not defined, in M3 mode it defaults to 0xFF fully opaque. In M2 mode
  /// defaults to [kFillColorLightOpacity] (0x0D = 5% opacity) in light theme
  /// and to [kFillColorDarkOpacity] (0x14 = 8% opacity) in dark mode.
  ///
  /// NOTE: This will be migrated to use o 0.0 to 1.0 opacity values in
  /// version 9.0. A parallel API wil be introduced in v8.0 to allow for
  /// a smooth migration path.
  ///
  /// * [prefixIconSchemeColor]
  /// The icon color of the prefixIcon in a focused [InputDecoration].
  ///
  /// If not defined defaults to [baseSchemeColor] in FCS M2 and to
  /// [SchemeColor.onSurface] in FCS M3.
  ///
  /// * [suffixIconSchemeColor]
  /// The icon color of the suffixIcon in a focused [InputDecoration].
  ///
  /// If not defined, defaults to [prefixIconSchemeColor] in FCS M2 and to
  /// [SchemeColor.onSurface] in FCS M3.
  ///
  /// * [borderSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the border
  /// color of the input decorator.
  ///
  /// The color is used by the focused border, but also as slight opacity
  /// based color on unfocused border, when [unfocusedHasBorder] and
  /// [unfocusedBorderIsColored] are true.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined and [baseSchemeColor] is also not defined, then
  /// in M3 and M2 mode, the border color defaults to primary.
  ///
  /// If not defined and [baseSchemeColor] is defined, it defaults
  /// to the color given by [baseSchemeColor].
  ///
  /// * [focusedBorderWidth]
  /// The border width when the input is selected.
  ///
  /// If null, defaults to [kThickBorderWidth] = 2.
  ///
  /// * [unfocusedBorderWidth]
  /// The border width when the input is unselected or disabled.
  ///
  /// If null, defaults to [kThinBorderWidth] = 1.
  ///
  /// * [gapPadding]
  /// Horizontal padding on either side of the border's
  /// [InputDecoration.labelText] width gap.
  ///
  /// Defaults to 4, which is also the default in SDK default input decorator.
  ///
  /// * [unfocusedHasBorder]
  /// Unfocused input decoration has a border.
  ///
  /// Defaults to true.
  ///
  /// Applies to both outline and underline mode. You would typically
  /// use this in a design where you use a fill color and want unfocused
  /// input fields to only be highlighted by the fill color and not even
  /// have an unfocused input border style.
  ///
  /// When set to false, there is no border bored on states enabledBorder and
  /// disabledBorder, there is a border on focusedBorder, focusedErrorBorder
  /// and errorBorder, so error thus has a border also when it is not focused.
  ///
  /// * [focusedHasBorder]
  /// Focused input decoration has a border.
  ///
  /// Defaults to true.
  ///
  /// Applies to both outline and underline mode. You would typically
  /// use this in a design where you use a fill color and want focused
  /// input fields to only be highlighted by the fill color and not even
  /// have an unfocused input border style.
  ///
  /// When set to false, there is no border bored on states enabledBorder and
  /// disabledBorder, there is a border on focusedBorder, focusedErrorBorder
  /// and errorBorder, so error thus has a border also when it is not focused.
  ///
  /// * [unfocusedBorderIsColored]
  /// Unfocused input decoration border uses the color baseScheme color.
  ///
  /// Applies to both outline and underline mode.
  ///
  /// When set to true, the unfocused borders also uses the [baseSchemeColor]
  /// as its border color, but with alpha [kEnabledBorderOpacity] (65%).
  ///
  /// If set to false, the color uses the SDK default unselected border color,
  /// which is [ColorScheme.onSurface] with 38% opacity.
  ///
  /// The unfocused border color selection also applies to it hovered state.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [tintedInteractions]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [tintedDisabled]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static InputDecorationThemeData inputDecorationTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Optional provided effective TextTheme to use as base for the
    /// input decorations.
    ///
    /// A default one is used if not provided.
    final TextTheme? textTheme,

    /// Selects which color from the passed in colorScheme to use for the border
    /// and fill color of the input decorator.
    ///
    /// If not defined, in M3 mode border color defaults to primary and fill
    /// color to surfaceContainerHighest. In M2 mode border and fill color both
    /// default to primary.
    ///
    /// The border [borderSchemeColor] can be used to define the
    /// border color separately. It defaults to this color, if
    /// [borderSchemeColor] is not defined, and this color is.
    final SchemeColor? baseSchemeColor,

    /// The decorated input fields corner border radius.
    ///
    /// If not defined, in Material-2 mode defaults to [kInputDecoratorRadius]
    /// which is 16, in Material-3 mode it defaults to
    /// [kInputDecoratorM3Radius] which is 4, following the Material
    /// 3 design specification.
    final double? radius,

    /// Selects input border type.
    ///
    /// If undefined, defaults to [FlexInputBorderType.underline].
    /// The underline style is default in Flutter SDK defaults too.
    final FlexInputBorderType? borderType,

    /// The padding for the input decoration's container.
    ///
    /// The decoration's container is the area which is filled if
    /// [InputDecoration.filled] is true and bordered per the [border].
    /// It's the area adjacent to [InputDecoration.icon] and above the
    /// [InputDecoration.icon] and above the widgets that contain
    /// [InputDecoration.helperText], [InputDecoration.errorText], and
    /// [InputDecoration.counterText].
    ///
    /// By default the [contentPadding] reflects [isDense] and the type of the
    /// [border]. If [isCollapsed] is true then [contentPadding] is
    /// [EdgeInsets.zero].
    ///
    /// When [isDense] is true, the content padding can be made smaller and
    /// tighter than when it is false.
    ///
    /// If no [contentPadding] is given, Flutter SDK uses default padding values
    /// that depends on if [isDense] is true or false and if we use outline or
    /// underline border.
    final EdgeInsetsGeometry? contentPadding,

    /// Whether the input decorator's child is part of a dense form (i.e., uses
    /// less vertical space).
    ///
    /// Defaults to false.
    final bool? isDense,

    /// If true the decoration's container is filled with [fillColor].
    ///
    /// Typically this field set to true if [border] is an
    /// [UnderlineInputBorder].
    ///
    /// The decoration's container is the area, defined by the border's
    /// [InputBorder.getOuterPath], which is filled if [filled] is
    /// true and bordered per the [border].
    ///
    /// Defaults to false, like Flutter SDK does. Filled is nicer, try it.
    final bool? filled,

    /// An optional totally custom fill color used to fill the
    /// `InputDecorator` background with, when `filled` is true.
    ///
    /// If null, defaults to color scheme color defined by `baseColor`
    /// withAlpha(0x0D) (5%) if color scheme is light and withAlpha(0x14) (8%)
    /// if color scheme is dark.
    final Color? fillColor,

    // TODO(rydmike): Migrate backgroundAlpha to backgroundOpacity.
    /// Defines the alpha, opacity channel value used as opacity on effective
    /// [InputDecorator] background color.
    ///
    /// If defined, the valid range is 0 to 255 (0x00 to 0xFF), if out of bounds
    /// it is capped to closest valid value.
    ///
    /// If not defined, in M3 mode it defaults to 0xFF fully opaque. In M2 mode
    /// defaults to [kFillColorLightOpacity] (0x0D = 5% opacity) in light theme
    /// and to [kFillColorDarkOpacity] (0x14 = 8% opacity) in dark mode.
    ///
    /// NOTE: This will be migrated to use o 0.0 to 1.0 opacity values in
    /// version 9.0. A parallel API wil be introduced in v8.0 to allow for
    /// a smooth migration path.
    final int? backgroundAlpha,

    /// The icon color of the prefixIcon in a focused [InputDecoration].
    ///
    /// If not defined defaults to [baseSchemeColor] in FCS M2 and to
    /// [SchemeColor.onSurface] in FCS M3.
    final SchemeColor? prefixIconSchemeColor,

    /// The icon color of the suffixIcon in a focused [InputDecoration].
    ///
    /// If not defined, defaults to [prefixIconSchemeColor] in FCS M2 and to
    /// [SchemeColor.onSurface] in FCS M3.
    final SchemeColor? suffixIconSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the border
    /// color of the input decorator.
    ///
    /// The color is used by the focused border, but also as slight opacity
    /// based color on unfocused border, when [unfocusedHasBorder] and
    /// [unfocusedBorderIsColored] are true.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined and [baseSchemeColor] is also not defined, then
    /// in M3 and M2 mode, the border color defaults to primary.
    ///
    /// If not defined and [baseSchemeColor] is defined, it defaults
    /// to the color given by [baseSchemeColor].
    final SchemeColor? borderSchemeColor,

    /// The border width when the input is selected.
    ///
    /// If null, defaults to [kThickBorderWidth] = 2.
    final double? focusedBorderWidth,

    /// The border width when the input is unselected or disabled.
    ///
    /// If null, defaults to [kThinBorderWidth] = 1.
    final double? unfocusedBorderWidth,

    /// Horizontal padding on either side of the border's
    /// [InputDecoration.labelText] width gap.
    ///
    /// Defaults to 4, which is also the default in SDK default input decorator.
    final double gapPadding = 4,

    /// Unfocused input decoration has a border.
    ///
    /// Defaults to true.
    ///
    /// Applies to both outline and underline mode. You would typically
    /// use this in a design where you use a fill color and want unfocused
    /// input fields to only be highlighted by the fill color and not even
    /// have an unfocused input border style.
    ///
    /// When set to false, there is no border bored on states enabledBorder and
    /// disabledBorder, there is a border on focusedBorder, focusedErrorBorder
    /// and errorBorder, so error thus has a border also when it is not focused.
    final bool unfocusedHasBorder = true,

    /// Focused input decoration has a border.
    ///
    /// Defaults to true.
    ///
    /// Applies to both outline and underline mode. You would typically
    /// use this in a design where you use a fill color and want focused
    /// input fields to only be highlighted by the fill color and not even
    /// have an unfocused input border style.
    ///
    /// When set to false, there is no border bored on states enabledBorder and
    /// disabledBorder, there is a border on focusedBorder, focusedErrorBorder
    /// and errorBorder, so error thus has a border also when it is not focused.
    final bool focusedHasBorder = true,

    /// Unfocused input decoration border uses the color baseScheme color.
    ///
    /// Applies to both outline and underline mode.
    ///
    /// When set to true, the unfocused borders also uses the [baseSchemeColor]
    /// as its border color, but with alpha [kEnabledBorderOpacity] (90%).
    ///
    /// If set to false, the color uses the SDK default unselected border color,
    /// which is [ColorScheme.onSurface] with 38% opacity.
    ///
    /// The unfocused border color selection also applies to it hovered state.
    ///
    /// If undefined, defaults to false.
    final bool? unfocusedBorderIsColored,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? tintedInteractions,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? tintedDisabled,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _inputDecorationTheme(
        colorScheme: colorScheme,
        textTheme: textTheme,
        baseSchemeColor: baseSchemeColor,
        radius: radius,
        borderType: borderType,
        contentPadding: contentPadding,
        isDense: isDense,
        filled: filled,
        fillColor: fillColor,
        backgroundAlpha: backgroundAlpha,
        prefixIconSchemeColor: prefixIconSchemeColor,
        suffixIconSchemeColor: suffixIconSchemeColor,
        borderSchemeColor: borderSchemeColor,
        focusedBorderWidth: focusedBorderWidth,
        unfocusedBorderWidth: unfocusedBorderWidth,
        gapPadding: gapPadding,
        unfocusedHasBorder: unfocusedHasBorder,
        focusedHasBorder: focusedHasBorder,
        unfocusedBorderIsColored: unfocusedBorderIsColored,
        tintedInteractions: tintedInteractions,
        tintedDisabled: tintedDisabled,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [ListTileThemeData] theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [selectedSchemeColor]
  /// Defines the color used for icons and text when the list tile is
  /// selected.
  ///
  /// If not defined, defaults to [ColorScheme.primary].
  ///
  /// * [iconSchemeColor]
  /// Defines the default color for ListTile leading and trailing icons.
  ///
  /// If this property is null and ListTile selected is false then this color is
  /// used.
  ///
  /// If null and [ThemeData.useMaterial3] is true,
  /// [ColorScheme.onSurfaceVariant] is used, otherwise in M2 and if
  /// [ThemeData.brightness] is [Brightness.light], [Colors.black54] is used,
  /// and if [ThemeData.brightness] is [Brightness.dark], the value is null.
  ///
  /// If [ListTile.selected] is true then [selectedSchemeColor] is used. If
  /// it is null then [ColorScheme.primary] is used.
  ///
  /// * [textSchemeColor]
  /// Defines the text color for the `title`, `subtitle`, `leading`, and
  /// `trailing`.
  ///
  /// If this property is null and [ListTile.selected] is false then
  /// [textSchemeColor] is used. If that is also null then
  /// default text color is used for the `title`, `subtitle`, `leading`, and
  /// `trailing`. Except for `subtitle`, if [ThemeData.useMaterial3] is false,
  /// [TextTheme.bodySmall] is used.
  ///
  /// If this property is null and [ListTile.selected] is true then
  /// [selectedSchemeColor is used. If that is also null
  /// then [ColorScheme.primary] is used.
  ///
  /// If this color is a [WidgetStateColor] it will be resolved against
  /// [WidgetState.selected] and [WidgetState.disabled] states.
  ///
  /// * [titleTextStyle]
  /// The text style for [ListTile.title].
  ///
  /// If this property is null, then [ListTileThemeData.titleTextStyle] is
  /// used.
  ///
  /// If that is also null and [ThemeData.useMaterial3] is true,
  /// [TextTheme.bodyLarge] with [ColorScheme.onSurface] will be used.
  ///
  /// Otherwise, If ListTile style is [ListTileStyle.list],
  /// [TextTheme.titleMedium] will be used and if ListTile style
  /// is [ListTileStyle.drawer], [TextTheme.bodyLarge] will be used.
  ///
  /// * [subtitleTextStyle]
  /// The text style for [ListTile.subtitle].
  ///
  /// If this property is null, then [ListTileThemeData.subtitleTextStyle]
  /// is used.
  ///
  /// If that is also null and [ThemeData.useMaterial3] is true,
  /// [TextTheme.bodyMedium] with [ColorScheme.onSurfaceVariant] will be used,
  /// otherwise [TextTheme.bodyMedium] with [TextTheme.bodySmall] color will
  /// be used.
  ///
  /// * [leadingAndTrailingTextStyle]
  /// The text style for [ListTile.leading] and [ListTile.trailing].
  ///
  /// If this property is null, then
  /// [ListTileThemeData.leadingAndTrailingTextStyle] is used.
  ///
  /// If that is also null and [ThemeData.useMaterial3] is true,
  /// [TextTheme.labelSmall] with [ColorScheme.onSurfaceVariant] will be used,
  /// otherwise [TextTheme.bodyMedium] will be used.
  ///
  /// * [tileSchemeColor]
  /// Defines the background color when [ListTile.selected] is false.
  ///
  /// If this property is null and [ListTile.selected] is false then
  /// [ListTileThemeData.tileColor] is used. If that is also null and
  /// [ListTile.selected] is true, [ListTile.selectedTileColor] is used.
  ///
  /// When that is also null, the [ListTileTheme.selectedTileColor] is used,
  /// otherwise [Colors.transparent] is used.
  ///
  /// * [selectedTileSchemeColor]
  /// Defines the background color of [ListTile.selected] is true.
  ///
  /// When the value if null, the [ListTile.selectedTileColor] is set to
  /// [ListTileTheme.selectedTileColor] if it's not null and to
  /// [Colors.transparent] if it's null.
  ///
  /// * [contentPadding]
  /// The tile's internal padding.
  ///
  /// Insets a [ListTile]'s contents, meaning its [ListTile.leading],
  /// [ListTile.title],[ListTile.subtitle] and [ListTile.trailing] widgets.
  ///
  ///
  /// If null, `EdgeInsets.symmetric(horizontal: 16.0)` is used, if
  /// `useMaterial3` is `false`. If `useMaterial3` is `true` then
  /// `EdgeInsetsDirectional.only(start: 16.0, end: 24.0)` is used.
  ///
  /// * [horizontalTitleGap]
  /// The horizontal gap between the titles and the leading/trailing widgets.
  ///
  /// If not defined, defaults to 16.
  ///
  /// * [minVerticalPadding]
  /// The minimum padding on the top and bottom of the title and subtitle
  /// widgets.
  ///
  /// If not defined, defaults to 4.
  ///
  /// * [style]
  /// Defines the font used for the [ListTile.title].
  ///
  /// If this property is null then [ListTileThemeData.style] is used. If that
  /// is also null then [ListTileStyle.list] is used.
  ///
  /// * [titleAlignment]
  /// Defines how [ListTile.leading] and [ListTile.trailing] are
  /// vertically aligned relative to the [ListTile]'s titles
  /// ([ListTile.title] and [ListTile.subtitle]).
  ///
  /// If this property is null then [ListTileThemeData.titleAlignment]
  /// is used. If that is also null then [ListTileTitleAlignment.threeLine]
  /// is used.
  ///
  /// * [controlAffinity]
  /// If specified, overrides the default value of
  /// [CheckboxListTile.controlAffinity] or [ExpansionTile.controlAffinity]
  /// or [SwitchListTile.controlAffinity] or [RadioListTile.controlAffinity].
  static ListTileThemeData listTileTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Defines the color used for icons and text when the list tile is
    /// selected.
    ///
    /// If not defined, defaults to [ColorScheme.primary].
    final SchemeColor? selectedSchemeColor,

    /// Defines the default color for ListTile [leading] and [trailing] icons.
    ///
    /// If this property is null and [selected] is false then this color is
    /// used.
    ///
    /// If null and [ThemeData.useMaterial3] is true,
    /// [ColorScheme.onSurfaceVariant] is used, otherwise in M2 and if
    /// [ThemeData.brightness] is [Brightness.light], [Colors.black54] is used,
    /// and if [ThemeData.brightness] is [Brightness.dark], the value is null.
    ///
    /// If [selected] is true then [selectedSchemeColor] is used. If
    /// it is null then [ColorScheme.primary] is used.
    final SchemeColor? iconSchemeColor,

    /// Defines the text color for the [title], [subtitle], [leading], and
    /// [trailing].
    ///
    /// If this property is null and [selected] is false then
    /// [textSchemeColor] is used. If that is also null then
    /// default text color is used for the [title], [subtitle], [leading], and
    /// [trailing]. Except for [subtitle], if [ThemeData.useMaterial3] is false,
    /// [TextTheme.bodySmall] is used.
    ///
    /// If this property is null and [selected] is true then
    /// [selectedSchemeColor is used. If that is also null
    /// then [ColorScheme.primary] is used.
    ///
    /// If this color is a [WidgetStateColor] it will be resolved against
    /// [WidgetState.selected] and [WidgetState.disabled] states.
    final SchemeColor? textSchemeColor,

    /// The text style for ListTile's [title].
    ///
    /// If this property is null, then [ListTileThemeData.titleTextStyle] is
    /// used.
    ///
    /// If that is also null and [ThemeData.useMaterial3] is true,
    /// [TextTheme.bodyLarge] with [ColorScheme.onSurface] will be used.
    ///
    /// Otherwise, If ListTile style is [ListTileStyle.list],
    /// [TextTheme.titleMedium] will be used and if ListTile style
    /// is [ListTileStyle.drawer], [TextTheme.bodyLarge] will be used.
    final TextStyle? titleTextStyle,

    /// The text style for ListTile's [subtitle].
    ///
    /// If this property is null, then [ListTileThemeData.subtitleTextStyle]
    /// is used.
    ///
    /// If that is also null and [ThemeData.useMaterial3] is true,
    /// [TextTheme.bodyMedium] with [ColorScheme.onSurfaceVariant] will be used,
    /// otherwise [TextTheme.bodyMedium] with [TextTheme.bodySmall] color will
    /// be used.
    final TextStyle? subtitleTextStyle,

    /// The text style for ListTile's [leading] and [trailing].
    ///
    /// If this property is null, then
    /// [ListTileThemeData.leadingAndTrailingTextStyle] is used.
    ///
    /// If that is also null and [ThemeData.useMaterial3] is true,
    /// [TextTheme.labelSmall] with [ColorScheme.onSurfaceVariant] will be used,
    /// otherwise [TextTheme.bodyMedium] will be used.
    final TextStyle? leadingAndTrailingTextStyle,

    /// Defines the background color of `ListTile` when [selected] is false.
    ///
    /// If this property is null and [selected] is false then
    /// [ListTileThemeData.tileColor] is used. If that is also null and
    /// [selected] is true, [selectedTileColor] is used.
    ///
    /// When that is also null, the [ListTileTheme.selectedTileColor] is used,
    /// otherwise [Colors.transparent] is used.
    final SchemeColor? tileSchemeColor,

    /// Defines the background color of `ListTile` when [selected] is true.
    ///
    /// When the value if null, the [selectedTileColor] is set to
    /// [ListTileTheme.selectedTileColor] if it's not null and to
    /// [Colors.transparent] if it's null.
    final SchemeColor? selectedTileSchemeColor,

    // TODO(rydmike): Default is incorrect for M3 in Flutter doc comment. Fix!
    /// The tile's internal padding.
    ///
    /// Insets a [ListTile]'s contents: its [leading], [title], [subtitle],
    /// and [trailing] widgets.
    ///
    ///
    /// If null, `EdgeInsets.symmetric(horizontal: 16.0)` is used, if
    /// `useMaterial3` is `false`. If `useMaterial3` is `true` then
    /// `EdgeInsetsDirectional.only(start: 16.0, end: 24.0)` is used.
    final EdgeInsetsGeometry? contentPadding,

    /// The horizontal gap between the titles and the leading/trailing widgets.
    ///
    /// If not defined, defaults to 16.
    final double? horizontalTitleGap,

    /// The minimum padding on the top and bottom of the title and subtitle
    /// widgets.
    ///
    /// If not defined, defaults to 4.
    final double? minVerticalPadding,

    /// Defines the font used for the [title].
    ///
    /// If this property is null then [ListTileThemeData.style] is used. If that
    /// is also null then [ListTileStyle.list] is used.
    final ListTileStyle? style,

    /// Defines how [ListTile.leading] and [ListTile.trailing] are
    /// vertically aligned relative to the [ListTile]'s titles
    /// ([ListTile.title] and [ListTile.subtitle]).
    ///
    /// If this property is null then [ListTileThemeData.titleAlignment]
    /// is used. If that is also null then [ListTileTitleAlignment.threeLine]
    /// is used.
    final ListTileTitleAlignment? titleAlignment,

    /// If specified, overrides the default value of
    /// [CheckboxListTile.controlAffinity] or [ExpansionTile.controlAffinity]
    /// or [SwitchListTile.controlAffinity] or [RadioListTile.controlAffinity].
    final ListTileControlAffinity? controlAffinity,
  }) =>
      _listTileTheme(
        colorScheme: colorScheme,
        selectedSchemeColor: selectedSchemeColor,
        iconSchemeColor: iconSchemeColor,
        textSchemeColor: textSchemeColor,
        titleTextStyle: titleTextStyle,
        subtitleTextStyle: subtitleTextStyle,
        leadingAndTrailingTextStyle: leadingAndTrailingTextStyle,
        tileSchemeColor: tileSchemeColor,
        selectedTileSchemeColor: selectedTileSchemeColor,
        contentPadding: contentPadding,
        horizontalTitleGap: horizontalTitleGap,
        minVerticalPadding: minVerticalPadding,
        style: style,
        titleAlignment: titleAlignment,
        controlAffinity: controlAffinity,
      );

  /// An opinionated [MenuBarThemeData] theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the MenuBar background color.
  ///
  /// If not defined, default to [ColorScheme.surfaceContainer].
  ///
  /// FlexColorScheme passes in
  /// [FlexSubThemesData.menuBarBackgroundSchemeColor] first, can be null, and
  /// uses [FlexSubThemesData.menuSchemeColor] as fallback, can also be null.
  ///
  /// * [shadowColor]
  /// The shadow color of the MenuBar's [Material].
  ///
  /// The material's elevation shadow can be difficult to see for dark themes,
  /// so by default the menu classes add a semi-transparent overlay to
  /// indicate elevation. See [ThemeData.applyElevationOverlayColor].
  ///
  /// * [surfaceTintColor]
  /// The surface tint color of the MenuBar's [Material].
  ///
  /// See [Material.surfaceTintColor] for more details.
  ///
  /// * [elevation]
  /// The elevation of the MenuBar's [Material].
  ///
  /// * [radius]
  /// MenuBar corner radius.
  ///
  /// If not defined, defaults to 4, the M3 specification, via Flutter SDK
  /// widget default values.
  static MenuBarThemeData menuBarTheme({
    // Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the MenuBar background color.
    ///
    /// If not defined, default to [ColorScheme.surfaceContainer].
    ///
    /// FlexColorScheme passes in
    /// [FlexSubThemesData.menuBarBackgroundSchemeColor] first, can be null, and
    /// uses [FlexSubThemesData.menuSchemeColor] as fallback, can also be null.
    final SchemeColor? backgroundSchemeColor,

    /// The shadow color of the MenuBar's [Material].
    ///
    /// The material's elevation shadow can be difficult to see for dark themes,
    /// so by default the menu classes add a semi-transparent overlay to
    /// indicate elevation. See [ThemeData.applyElevationOverlayColor].
    final Color? shadowColor,

    /// The surface tint color of the MenuBar's [Material].
    ///
    /// See [Material.surfaceTintColor] for more details.
    final Color? surfaceTintColor,

    /// The elevation of the MenuBar's [Material].
    final double? elevation,

    /// MenuBar corner radius.
    ///
    /// If not defined, defaults to 4, the M3 specification, via Flutter SDK
    /// widget default values.
    final double? radius,
  }) =>
      _menuBarTheme(
          colorScheme: colorScheme,
          backgroundSchemeColor: backgroundSchemeColor,
          shadowColor: shadowColor,
          surfaceTintColor: surfaceTintColor,
          elevation: elevation,
          radius: radius);

  /// An opinionated [MenuButtonThemeData] theme.
  ///
  /// Provides complex styling for themed [SubmenuButton]s and [MenuItemButton]s
  /// with [SchemeColor] selections. Border radius on the indicator, highlighted
  /// menu item.
  ///
  /// If highlight colors are not defined, the highlighted item uses default
  /// [WidgetState] property response os overlay for highlighted item.
  /// These states can optionally also use FlexColorScheme tinted style.
  /// Disabled items can also to use the optional FCS tinted style.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [menuBackgroundSchemeColor]
  /// Provide info on which color from the passed in [colorScheme] parameter
  /// that is used as background color of menu containers defined by
  /// [FlexSubThemes.menuTheme] and [FlexSubThemes.menuBarTheme]. The menu
  /// container is used by [MenuAnchor], [DropdownMenu] and menus on
  /// [MenuBar].
  ///
  /// If not defined, defaults to [ColorScheme.surfaceContainer].
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the [SubmenuButton]s and [MenuItemButton]s background color for
  /// unselected, i.e. not highlighted via hover, focus or pressed state.
  ///
  /// If not defined, defaults to [menuBackgroundSchemeColor].
  ///
  /// * [foregroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the [SubmenuButton]s and [MenuItemButton]s foreground color.
  ///
  /// If not defined, defaults to the contrast pair for
  /// [backgroundSchemeColor].
  ///
  /// * [indicatorBackgroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the highlighted [SubmenuButton]s and [MenuItemButton]s indicator
  /// background color.
  ///
  /// If not defined, defaults to [backgroundSchemeColor] and the indicator
  /// only get overlay color hover, focus and press states.
  ///
  /// * [indicatorForegroundSchemeColor]
  /// Select which color from the passed in [colorScheme] parameter to use as
  /// the highlighted [SubmenuButton]s and [MenuItemButton]s indicator
  /// foreground color.
  ///
  /// If not defined, defaults to the contrast pair for
  /// [indicatorBackgroundSchemeColor], without its overlay color.
  /// If [indicatorBackgroundSchemeColor] is not defined the result of
  /// this is same color as [foregroundSchemeColor].
  ///
  /// * [radius]
  /// The MenuButton corner border radius.
  ///
  /// If not defined, defaults to 0 via Widget's default behavior.
  ///
  /// * [textStyle]
  /// The style for a menu button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// [foregroundSchemeColor] is used instead.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  static MenuButtonThemeData menuButtonTheme({
    // Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Provide info on which color from the passed in [colorScheme] parameter
    /// that is used as background color of menu containers defined by
    /// [FlexSubThemes.menuTheme] and [FlexSubThemes.menuBarTheme]. The menu
    /// container is used by [MenuAnchor], [DropDownMenu] and menus on
    /// [MenuBar].
    ///
    /// If not defined, defaults to [ColorScheme.surfaceContainer].
    final SchemeColor? menuBackgroundSchemeColor,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the [SubmenuButton]s and [MenuItemButton]s background color for
    /// unselected, i.e. not highlighted via hover, focus or pressed state.
    ///
    /// If not defined, defaults to [menuBackgroundSchemeColor].
    final SchemeColor? backgroundSchemeColor,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the [SubmenuButton]s and [MenuItemButton]s foreground color.
    ///
    /// If not defined, defaults to the contrast pair for
    /// [backgroundSchemeColor].
    final SchemeColor? foregroundSchemeColor,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the highlighted [SubmenuButton]s and [MenuItemButton]s indicator
    /// background color.
    ///
    /// If not defined, defaults to [backgroundSchemeColor] and the indicator
    /// only get overlay color hover, focus and press states.
    final SchemeColor? indicatorBackgroundSchemeColor,

    /// Select which color from the passed in [colorScheme] parameter to use as
    /// the highlighted [SubmenuButton]s and [MenuItemButton]s indicator
    /// foreground color.
    ///
    /// If not defined, defaults to the contrast pair for
    /// [indicatorBackgroundSchemeColor], without its overlay color.
    /// If [indicatorBackgroundSchemeColor] is not defined the result of
    /// this is same color as [foregroundSchemeColor].
    final SchemeColor? indicatorForegroundSchemeColor,

    /// The MenuButton corner border radius.
    ///
    /// If not defined, defaults to 0 via Widget's default behavior.
    final double? radius,

    /// The style for a menu button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// [foregroundSchemeColor] is used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,
  }) =>
      _menuButtonTheme(
        colorScheme: colorScheme,
        menuBackgroundSchemeColor: menuBackgroundSchemeColor,
        backgroundSchemeColor: backgroundSchemeColor,
        foregroundSchemeColor: foregroundSchemeColor,
        indicatorBackgroundSchemeColor: indicatorBackgroundSchemeColor,
        indicatorForegroundSchemeColor: indicatorForegroundSchemeColor,
        radius: radius,
        textStyle: textStyle,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
      );

  /// An opinionated [MenuThemeData] theme.
  ///
  /// This theme is used by the menu for the [DropdownMenu], [MenuBar] and
  /// [MenuAnchor].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based background color
  /// of [PopupMenuButton].
  ///
  /// If not defined, will remains null and via Flutter SDK defaults get
  /// [ColorScheme.surfaceContainer] color.
  ///
  /// * [opacity]
  /// Menu background opacity.
  ///
  /// Used by FlexColorScheme to modify the opacity the themed [MenuBar],
  /// [MenuAnchor] and [DropdownMenu] background color.
  ///
  /// Defaults to undefined (null).
  /// If undefined, produced result is same as 1, fully opaque.
  ///
  /// If opacity is defined and [backgroundSchemeColor] is undefined,
  /// then [ColorScheme.surfaceContainer] will be used as background color to
  /// make a background color with opacity.
  ///
  /// * [radius]
  /// Menu corner radius.
  ///
  /// If not defined, default to 4 via Menu widget Flutter SDK defaults.
  ///
  /// * [padding]
  /// The padding between the menu's boundary and its child.
  ///
  /// * [elevation]
  /// Popup menu elevation.
  ///
  /// If not defined, defaults to 3 dp via Flutter widget SDK defaults.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value for [MenuThemeData.style] and its
  /// `surfaceTintColor`.
  static MenuThemeData menuTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Defines which [Theme] based [ColorScheme] based background color
    /// of [PopupMenuButton].
    ///
    /// If not defined, will remains null and via Flutter SDK defaults get
    /// [ColorScheme.surfaceContainer] color.
    final SchemeColor? backgroundSchemeColor,

    /// Menu background opacity.
    ///
    /// Used by FlexColorScheme to modify the opacity the themed [MenuBar],
    /// [MenuAnchor] and [DropDownMenu] background color.
    ///
    /// Defaults to undefined (null).
    /// If undefined, produced result is same as 1, fully opaque.
    ///
    /// If opacity is defined and [backgroundSchemeColor] is undefined,
    /// then [ColorScheme.surfaceContainer] will be used as background color to
    /// make a background color with opacity.
    final double? opacity,

    /// Menu corner radius.
    ///
    /// If not defined, default to 4 via Menu widget Flutter SDK defaults.
    final double? radius,

    /// The padding between the menu's boundary and its child.
    final EdgeInsetsGeometry? padding,

    /// Popup menu elevation.
    ///
    /// If not defined, defaults to 3 dp via Flutter widget SDK defaults.
    final double? elevation,

    /// Overrides the default value for MenuThemeData
    /// [menuStyle.surfaceTintColor].
    final Color? surfaceTintColor,
  }) =>
      _menuTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        opacity: opacity,
        radius: radius,
        padding: padding,
        elevation: elevation,
        surfaceTintColor: surfaceTintColor,
      );

  /// An opinionated [NavigationBarThemeData] with a flat API.
  ///
  /// The navigation bar can use opinionated color choices from the passed
  /// [colorScheme] to style the bottom navigation bar, it uses "quick"
  /// settings not requiring usage of WidgetState property resolutions.
  ///
  /// This sub-theme uses a style that prefers single use config parameters over
  /// the ones that combines many styling options into sub-themes and
  /// WidgetState properties. This is simpler to use when you want to just
  /// modify a single property like size and rest is fine. This is done of
  /// course at the expense that the sub-theme instead has a lot of properties.
  ///
  /// [FlexColorScheme] uses this sub theme based on a large number of
  /// properties in [FlexSubThemesData] to make custom default styled sub-theme
  /// that matches its other themes, it can also use a config that uses the
  /// M3 defaults as starting point. In both cases override values can
  /// be applied as well.
  ///
  /// You can also use the sub-theme helper as an alternative API for creating
  /// a custom sub-theme for [NavigationBarThemeData], as thins one does not
  /// need the complicated [WidgetStateProperty] which can be difficult to
  /// use. It instead exposes properties for the usable states.
  ///
  /// It can also set an [opacity] on the background color.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [labelTextStyle]
  /// Optional text style for the [NavigationBar] labels.
  ///
  /// The size and colors defined in any of the text size and color properties
  /// are applied as overrides on the text style.
  ///
  /// * [selectedLabelSize]
  /// The size of the text label on selected [NavigationBar] item.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on selected item, 12 is used as fallback if needed.
  ///
  /// * [unselectedLabelSize]
  /// The size of the text label on unselected [NavigationBar] items.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on unselected items, 12 is used as fallback if needed.
  ///
  /// * [selectedLabelSchemeColor]
  /// Select which color from the passed in [ColorScheme] to use for
  /// the [NavigationBar]'s label text color.
  ///
  /// When undefined, if [backgroundSchemeColor] is defined, its
  /// contrasting on color will be used, if it is also undefined
  /// [SchemeColor.onSurface] will be used.
  ///
  /// Flutter is default is onSurface.
  ///
  /// * [unselectedLabelSchemeColor]
  /// Select which color from the theme's [ColorScheme] to for
  /// the [NavigationBar]'s unselected label text color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also undefined,
  /// then this defaults to [SchemeColor.onSurfaceVariant].
  ///
  /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and
  /// [ColorScheme.onSurfaceVariant] in M3 mode.
  ///
  /// * [mutedUnselectedLabel]
  /// If true, the unselected label in the [NavigationBar] use a more
  /// muted color version of the color defined by
  /// [unselectedLabelSchemeColor].
  ///
  /// The muting is unselected color with
  /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
  /// and withAlpha([kUnselectedAlphaBlend]).
  ///
  /// If undefined, defaults to false.
  ///
  /// * [selectedIconSize]
  /// The size of the icon on selected [NavigationBar] item.
  ///
  /// If undefined, defaults to 24.
  ///
  /// * [unselectedIconSize]
  /// The size of the icons on unselected [NavigationBar] items.
  ///
  /// If null, defaults to [selectedIconSize].
  ///
  /// * [selectedIconSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [NavigationBar]'s selected item icon color.
  ///
  /// If undefined, and [indicatorSchemeColor] is also
  /// undefined, then defaults to [SchemeColor.onSecondaryContainer].
  /// If undefined, but [indicatorSchemeColor] is defined, then
  /// it defaults to the contrast onColor pair of the indicator color
  /// [indicatorSchemeColor]
  ///
  /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and
  /// [ColorScheme.onSecondaryContainer] in M3.
  ///
  /// * [unselectedIconSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [NavigationBar]'s unselected item icon color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also undefined,
  /// then this defaults to [SchemeColor.onSurfaceVariant].
  ///
  /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and to
  /// [ColorScheme.onSurfaceVariant] in M3 mode.
  ///
  /// * [mutedUnselectedIcon]
  /// If true, the unselected icon in the [NavigationBar] use a more muted
  /// color version of the color defined by [unselectedIconSchemeColor].
  ///
  /// The muting is unselected color with
  /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
  /// and withAlpha([kUnselectedAlphaBlend]).
  ///
  /// If undefined, defaults to false.
  ///
  /// * [indicatorSchemeColor]
  /// Select which color from the theme [ColorScheme] to use as base for
  /// the [NavigationBar]'s selected item indicator.
  ///
  /// If undefined, defaults to [SchemeColor.secondaryContainer].
  ///
  /// Flutter SDK defaults to secondaryContainer in M3 mode and to
  /// secondary in M2 mode with opacity 24%.
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use as background
  /// color for the [NavigationBar].
  ///
  /// If undefined, defaults to [SchemeColor.surfaceContainer]
  ///
  /// Flutter SDK defaults to surfaceContainer in M3 and in M2 mode to
  /// surface color, with a color overlay using onSurface at
  /// fixed elevation 3.
  ///
  /// * [opacity]
  /// NavigationBar background opacity.
  ///
  /// If undefined, defaults to 1, fully opaque.
  ///
  /// * [elevation]
  /// NavigationBar elevation.
  ///
  /// If undefined, defaults to default in M3 mode which is 3 and in
  /// M2 mode 0.
  ///
  /// In M2 mode it defaults [kBottomNavigationBarElevation] = 3.
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value of [NavigationBar.surfaceTintColor].
  ///
  /// * [shadowColor]
  /// Overrides the default value of [NavigationBar.shadowColor].
  ///
  /// * [height]
  /// Height of the container for the Material 3 [NavigationBar].
  ///
  /// If undefined defaults to M3 spec 80dp.
  ///
  /// * [labelBehavior]
  /// Specifies when each [NavigationDestination]'s label should appear.
  ///
  /// This is used to determine the behavior of NavigationBar's destinations.
  ///
  /// If null, theme behavior defaults to
  /// `NavigationDestinationLabelBehavior.alwaysShow` via Flutter SDK default.
  ///
  /// * [indicatorAlpha]
  /// The alpha value used on selection color of the selection indicator on
  /// the [NavigationBar].
  ///
  /// If not defined, defaults to is 0xFF, or opacity 1.
  ///
  /// Flutter SDK uses 24% in M2 and 100% in M3,
  ///
  /// * [indicatorRadius]
  /// Border radius of the selection indicator on the [NavigationBar].
  ///
  /// If not defined, defaults to [StadiumBorder].
  ///
  /// FCS default, follows the Material M3 guide:
  /// https://m3.material.io/components/navigation-bar/specs
  ///
  /// * [unselectedAlphaBlend]
  /// The icon color alpha blend value for unselected items, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
  /// 0x66 = 102 = 40%.
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [unselectedAlpha]
  /// The icon alpha value for unselected item, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedAlphaBlend], which is
  /// 0xA5 = 165 = 65%
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// The M2/M3 SDK defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  ///
  /// * [useFlutterDefaults]
  /// Set to true to use Flutter SDK defaults for [NavigationBar]
  /// theme when its properties are undefined (null), instead of using
  /// FlexColorScheme's own opinionated defaults.
  ///
  /// Recommend keeping it **false** for a more color harmonized component
  /// theme starting point. This flag can be helpful if you want to create
  /// custom sub-themes starting from less opinionated settings.
  ///
  /// When all required properties are undefined and flag is false or true,
  /// the effective default styles for undefined inputs become:
  ///
  /// ```text
  ///                    FCS defaults   M2 defaults       useMaterial3:true
  /// useFlutterDefaults false          true              true
  /// results in:
  ///
  /// - background       surfaceVariant surface with      surface with
  ///                                   onSurface overlay primary overlay
  ///                    elev 3         elev 0            elev 3
  /// - height           80             80                80
  /// - indicator        primary op24%  secondary op24%   secondaryContainer
  /// - selected icon    primary        onSurface         onSecondaryContainer
  /// - unselected icon  onSurface      onSurface         onSurfaceVariant
  /// - Selected label   primary        onSurface         onSurface
  /// - unSelected label onSurface      onSurface         onSurfaceVariant
  /// - TextTheme        labelMedium    overline          labelMedium
  /// ```
  /// FCS further applies both an alpha blend and slight opacity to
  /// unselected icon and unselected label, but only if
  /// [FlexSubThemesData.navigationBarMutedUnselectedIcon] and
  /// [FlexSubThemesData.navigationBarMutedUnselectedLabel] are true
  /// respectively, this also applies to undefined color inputs.
  static NavigationBarThemeData navigationBarTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Optional text style for the [NavigationBar] labels.
    ///
    /// The size and colors defined in any of the text size and color properties
    /// are applied as overrides on the text style.
    final TextStyle? labelTextStyle,

    /// The size of the text label on selected [NavigationBar] item.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on selected item, 12 is used as fallback if needed.
    final double? selectedLabelSize,

    /// The size of the text label on unselected [NavigationBar] items.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on unselected items, 12 is used as fallback if needed.
    final double? unselectedLabelSize,

    /// Select which color from the passed in [ColorScheme] to use for
    /// the [NavigationBar]'s label text color.
    ///
    /// When undefined, if [backgroundSchemeColor] is defined, its
    /// contrasting on color will be used, if it is also undefined
    /// [SchemeColor.onSurface] will be used.
    ///
    /// Flutter is default is onSurface.
    final SchemeColor? selectedLabelSchemeColor,

    /// Select which color from the theme's [ColorScheme] to for
    /// the [NavigationBar]'s unselected label text color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also undefined,
    /// then this defaults to [SchemeColor.onSurfaceVariant].
    ///
    /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and
    /// [ColorScheme.onSurfaceVariant] in M3 mode.
    final SchemeColor? unselectedLabelSchemeColor,

    // TODO(rydmike): Commented as part of deprecation of blendTextTheme.
    //
    // An alternative unselected item color.
    //
    // It is used as fallback if [unselectedIconSchemeColor] is not specified,
    // before its normal default fallbacks.
    //
    // The color is typically used to provide the color created by blended or
    // tinted text theme, when it is being used by FlexColorScheme as an
    // `onSurfaceVariant` equivalent style, but a bit more primary tinted.
    //
    // FlexColorScheme passes in its `onSurfaceVariantBlendedTextStyle` when
    // a blended TextTheme is being used.
    // final Color? altUnselectedColor,

    /// If true, the unselected label in the [NavigationBar] use a more
    /// muted color version of the color defined by
    /// [unselectedLabelSchemeColor].
    ///
    /// The muting is unselected color with
    /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
    /// and withAlpha([kUnselectedAlphaBlend]).
    ///
    /// If undefined, defaults to false.
    final bool? mutedUnselectedLabel,

    /// The size of the icon on selected [NavigationBar] item.
    ///
    /// If undefined, defaults to 24.
    final double? selectedIconSize,

    /// The size of the icons on unselected [NavigationBar] items.
    ///
    /// If null, defaults to [selectedIconSize].
    final double? unselectedIconSize,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [NavigationBar]'s selected item icon color.
    ///
    /// If undefined, and [indicatorSchemeColor] is also
    /// undefined, then defaults to [SchemeColor.onSecondaryContainer].
    /// If undefined, but [indicatorSchemeColor] is defined, then
    /// it defaults to the contrast onColor pair of the indicator color
    /// [indicatorSchemeColor]
    ///
    /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and
    /// [ColorScheme.onSecondaryContainer] in M3.
    final SchemeColor? selectedIconSchemeColor,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [NavigationBar]'s unselected item icon color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also undefined,
    /// then this defaults to [SchemeColor.onSurfaceVariant].
    ///
    /// Flutter SDK defaults to [ColorScheme.onSurface] in M2 mode and to
    /// [ColorScheme.onSurfaceVariant] in M3 mode.
    final SchemeColor? unselectedIconSchemeColor,

    /// If true, the unselected icon in the [NavigationBar] use a more muted
    /// color version of the color defined by [unselectedIconSchemeColor].
    ///
    /// The muting is unselected color with
    /// blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
    /// and withAlpha([kUnselectedAlphaBlend]).
    ///
    /// If undefined, defaults to false.
    final bool? mutedUnselectedIcon,

    /// Select which color from the theme [ColorScheme] to use as base for
    /// the [NavigationBar]'s selected item indicator.
    ///
    /// If undefined, defaults to [SchemeColor.secondaryContainer].
    ///
    /// Flutter SDK defaults to secondaryContainer in M3 mode and to
    /// secondary in M2 mode with opacity 24%.
    final SchemeColor? indicatorSchemeColor,

    /// Select which color from the theme's [ColorScheme] to use as background
    /// color for the [NavigationBar].
    ///
    /// If undefined, defaults to [SchemeColor.surfaceContainer]
    ///
    /// Flutter SDK defaults to surfaceContainer in M3 and in M2 mode to
    /// surface color, with a color overlay using onSurface at
    /// fixed elevation 3.
    final SchemeColor? backgroundSchemeColor,

    /// NavigationBar background opacity.
    ///
    /// If undefined, defaults to 1, fully opaque.
    final double? opacity,

    /// NavigationBar elevation.
    ///
    /// If undefined, defaults to default in M3 mode which is 3 and in
    /// M2 mode 0.
    ///
    /// In M2 mode it defaults [kBottomNavigationBarElevation] = 3.
    final double? elevation,

    /// Overrides the default value of [NavigationBar.surfaceTintColor].
    final Color? surfaceTintColor,

    /// Overrides the default value of [NavigationBar.shadowColor].
    final Color? shadowColor,

    /// Height of the container for the Material 3 [NavigationBar].
    ///
    /// If undefined defaults to M3 spec 80dp.
    final double? height,

    /// Specifies when each [NavigationDestination]'s label should appear.
    ///
    /// This is used to determine the behavior of NavigationBar's destinations.
    ///
    /// If null, theme behavior defaults to
    /// `NavigationDestinationLabelBehavior.alwaysShow` via Flutter SDK default.
    final NavigationDestinationLabelBehavior? labelBehavior,

    /// The alpha value used on selection color of the selection indicator on
    /// the [NavigationBar].
    ///
    /// If not defined, defaults to is 0xFF, or opacity 1.
    ///
    /// Flutter SDK uses 24% in M2 and 100% in M3,
    final int? indicatorAlpha,

    /// Border radius of the selection indicator on the [NavigationBar].
    ///
    /// If not defined, defaults to [StadiumBorder].
    ///
    /// FCS default, follows the Material M3 guide:
    /// https://m3.material.io/components/navigation-bar/specs
    final double? indicatorRadius,

    /// The icon color alpha blend value for unselected items, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
    /// 0x66 = 102 = 40%.
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlphaBlend = kUnselectedBackgroundPrimaryAlphaBlend,

    /// The icon alpha value for unselected item, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedAlphaBlend], which is
    /// 0xA5 = 165 = 65%
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlpha = kUnselectedAlphaBlend,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// The M2/M3 SDK defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    @Deprecated(
      'The useMaterial3 flag no longer has any function in this '
      'component theme and is deprecated here. It will be removed in v9',
    )
    final bool? useMaterial3,

    /// Set to true to use Flutter SDK defaults for [NavigationBar]
    /// theme when its properties are undefined (null), instead of using
    /// FlexColorScheme's own opinionated defaults.
    ///
    /// Recommend keeping it **false** for a more color harmonized component
    /// theme starting point. This flag can be helpful if you want to create
    /// custom sub-themes starting from less opinionated settings.
    ///
    /// When all required properties are undefined and flag is false or true,
    /// the effective default styles for undefined inputs become:
    ///
    /// ```text
    ///                    FCS defaults   M2 defaults       useMaterial3:true
    /// useFlutterDefaults false          true              true
    /// results in:
    ///
    /// - background       surfaceVariant surface with      surface with
    ///                                   onSurface overlay primary overlay
    ///                    elev 3         elev 0            elev 3
    /// - height           80             80                80
    /// - indicator        primary op24%  secondary op24%   secondaryContainer
    /// - selected icon    primary        onSurface         onSecondaryContainer
    /// - unselected icon  onSurface      onSurface         onSurfaceVariant
    /// - Selected label   primary        onSurface         onSurface
    /// - unSelected label onSurface      onSurface         onSurfaceVariant
    /// - TextTheme        labelMedium    overline          labelMedium
    /// ```
    /// FCS further applies both an alpha blend and slight opacity to
    /// unselected icon and unselected label, but only if
    /// [FlexSubThemesData.navigationBarMutedUnselectedIcon] and
    /// [FlexSubThemesData.navigationBarMutedUnselectedLabel] are true
    /// respectively, this also applies to undefined color inputs.
    @Deprecated(
      'The `useFlutterDefaults` is deprecated, it no longer has any '
      'function and will be removed in v9. FlexColorScheme in M3 mode '
      'defaults to using mostly Flutter defaults styles. '
      'For other configurations modify the theme as desired. '
      'In M2 mode FCS will continue to use its own opinionated defaults for '
      'as long as M2 exists.',
    )
    final bool? useFlutterDefaults,
  }) =>
      _navigationBarTheme(
        colorScheme: colorScheme,
        labelTextStyle: labelTextStyle,
        selectedLabelSize: selectedLabelSize,
        unselectedLabelSize: unselectedLabelSize,
        selectedLabelSchemeColor: selectedLabelSchemeColor,
        unselectedLabelSchemeColor: unselectedLabelSchemeColor,
        mutedUnselectedLabel: mutedUnselectedLabel,
        selectedIconSize: selectedIconSize,
        unselectedIconSize: unselectedIconSize,
        selectedIconSchemeColor: selectedIconSchemeColor,
        unselectedIconSchemeColor: unselectedIconSchemeColor,
        mutedUnselectedIcon: mutedUnselectedIcon,
        indicatorSchemeColor: indicatorSchemeColor,
        backgroundSchemeColor: backgroundSchemeColor,
        opacity: opacity,
        elevation: elevation,
        surfaceTintColor: surfaceTintColor,
        shadowColor: shadowColor,
        height: height,
        labelBehavior: labelBehavior,
        indicatorAlpha: indicatorAlpha,
        indicatorRadius: indicatorRadius,
        unselectedAlphaBlend: unselectedAlphaBlend,
        unselectedAlpha: unselectedAlpha,
        // ignore: deprecated_member_use_from_same_package, legacy support.
        useMaterial3: useMaterial3,
        // ignore: deprecated_member_use_from_same_package, legacy support.
        useFlutterDefaults: useFlutterDefaults,
      );

  /// An opinionated [NavigationDrawerThemeData] theme with simpler API.
  ///
  /// Can set [indicatorWidth], [indicatorRadius], [backgroundSchemeColor] and
  /// [indicatorSchemeColor] plus its opacity [indicatorOpacity] and colors
  /// for selected and unselected items [selectedItemSchemeColor],
  /// [unselectedItemSchemeColor].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based background color
  /// of [NavigationDrawer].
  ///
  /// If it is not defined, FCS uses [ColorScheme.surfaceContainerLow] color
  /// as default in both M2 and M3 mode
  ///
  /// Flutter SDK default uses [ColorScheme.surfaceContainerLow] color as
  /// default in M3 and [ThemeData.canvasColor] in M2.
  ///
  /// * [indicatorWidth]
  /// Defines the width of [NavigationDrawer]'s indicator.
  ///
  /// If not defined, defaults to 336dp
  /// via Flutter SDK defaults for M3/M2. The 336dp width values is derived
  /// from the M3 padding spec of 12dp around both sides of the M3 drawers
  /// default width of 360dp.
  ///
  /// * [indicatorRadius]
  /// Border radius of the selection indicator on the [NavigationDrawer].
  ///
  /// If not defined, defaults to [StadiumBorder].
  ///
  /// FCS default, follows the Material M3 guide:
  /// https://m3.material.io/components/navigation-drawer/specs
  ///
  /// * [textStyle]
  /// The TextStyle of the labels.
  ///
  /// You would pass in Theme.of(context).textTheme.labelLarge
  /// for correct M3 style.
  ///
  /// * [indicatorSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
  /// uses as as its background color on the selection indicator.
  ///
  /// If undefined, defaults to [SchemeColor.secondaryContainer].
  ///
  /// * [indicatorOpacity]
  /// The opacity of the used indicator.
  ///
  /// Defaults to 1, fully opaque if not defined.
  ///
  /// * [selectedItemSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
  /// uses as as its selected item color.
  ///
  /// If undefined, defaults to correct contrast color pair
  /// for [indicatorSchemeColor].
  ///
  /// * [unselectedItemSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
  /// uses as as its unselected item color.
  ///
  /// If undefined, defaults to correct contrast color pair for
  /// [backgroundSchemeColor].
  ///
  /// * [shadowColor]
  /// Overrides the default value of [NavigationDrawer.shadowColor].
  ///
  /// * [surfaceTintColor]
  /// Overrides the default value of [NavigationDrawer.surfaceTintColor].
  static NavigationDrawerThemeData navigationDrawerTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Defines which [Theme] based [ColorScheme] based background color
    /// of [NavigationDrawer].
    ///
    /// If it is not defined, FCS uses [surfaceContainerLow] color as default in
    /// both M2 and M3 mode
    ///
    /// Flutter SDK default uses [surfaceContainerLow] color as default in M3,
    /// and [ThemeData.canvasColor] in M2.
    final SchemeColor? backgroundSchemeColor,

    /// Defines the width of [NavigationDrawer]'s indicator.
    ///
    /// If not defined, defaults to 336dp
    /// via Flutter SDK defaults for M3/M2. The 336dp width values is derived
    /// from the M3 padding spec of 12dp around both sides of the M3 drawers
    /// default width of 360dp.
    final double? indicatorWidth,

    /// Border radius of the selection indicator on the [NavigationDrawer].
    ///
    /// If not defined, defaults to [StadiumBorder].
    ///
    /// FCS default, follows the Material M3 guide:
    /// https://m3.material.io/components/navigation-drawer/specs
    final double? indicatorRadius,

    /// The TextStyle of the labels.
    ///
    /// You would pass in Theme.of(context).textTheme.labelLarge
    /// for correct M3 style.
    final TextStyle? textStyle,

    /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
    /// uses as as its background color on the selection indicator.
    ///
    /// If undefined, defaults to [SchemeColor.secondaryContainer].
    final SchemeColor? indicatorSchemeColor,

    /// The opacity of the used indicator.
    ///
    /// Defaults to 1, fully opaque if not defined.
    final double? indicatorOpacity,

    /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
    /// uses as as its selected item color.
    ///
    /// If undefined, defaults to correct contrast color pair
    /// for [indicatorSchemeColor].
    final SchemeColor? selectedItemSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color [NavigationDrawer]
    /// uses as as its unselected item color.
    ///
    /// If undefined, defaults to correct contrast color pair for
    /// [backgroundSchemeColor].
    final SchemeColor? unselectedItemSchemeColor,

    // TODO(rydmike): Commented as part of deprecation of blendTextTheme.
    //
    // An alternative unselected item color.
    //
    // It is used as fallback if [unselectedIconSchemeColor] is not specified,
    // before its normal default fallbacks.
    //
    // The color is typically used to provide the color created by blended or
    // tinted text theme, when it is being used by FlexColorScheme as an
    // `onSurfaceVariant` equivalent style, but a bit more primary tinted.
    //
    // FlexColorScheme passes in its `onSurfaceVariantBlendedTextStyle` when
    // a blended TextTheme is being used.
    // final Color? altUnselectedColor,

    /// Overrides the default value of [NavigationDrawer.shadowColor].
    final Color? shadowColor,

    /// Overrides the default value of [NavigationDrawer.surfaceTintColor].
    final Color? surfaceTintColor,
  }) =>
      _navigationDrawerTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        indicatorWidth: indicatorWidth,
        indicatorRadius: indicatorRadius,
        textStyle: textStyle,
        indicatorSchemeColor: indicatorSchemeColor,
        indicatorOpacity: indicatorOpacity,
        selectedItemSchemeColor: selectedItemSchemeColor,
        unselectedItemSchemeColor: unselectedItemSchemeColor,
        shadowColor: shadowColor,
        surfaceTintColor: surfaceTintColor,
      );

  // TODO(rydmike): NavigationRail unselectedLabelSchemeColor, wrong default!
  //   should be onSurfaceVariant but uses onSurface, see M3 spec.
  //   This was last checked Nov 24, 2025 in Flutter master.

  /// An opinionated [NavigationRailThemeData] with simpler API.
  ///
  /// The navigation rail can use opinionated color choices from the passed
  /// [colorScheme] to style the navigation rail.
  ///
  /// This sub-theme uses a style that prefers single use config parameters over
  /// the ones that combines many styling options into TextStyle and icon
  /// sub-theme properties. This is simpler to use when you want to just
  /// modify a single property like size and rest is fine. This is done of
  /// course at the expense that the sub-theme instead has a lot of properties.
  ///
  /// [FlexColorScheme] uses this sub theme based on a large number of
  /// properties in [FlexSubThemesData] to make custom default styled sub-theme
  /// that matches its other themes.
  ///
  /// You can also use the sub-theme helper as an alternative API for creating
  /// a custom sub-theme for [NavigationRailThemeData].
  /// It can also set an [opacity] on the background color, although the use
  /// case for it is not as common as on bottom navigation bars.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [labelTextStyle]
  /// Optional text style for the [NavigationRail] labels.
  ///
  /// The size and colors defined in any of the text size and color properties
  /// are applied as overrides on this text style.
  ///
  /// * [selectedLabelSize]
  /// The size of the text label on selected [NavigationRail] item.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on selected item.
  ///
  /// If not defined, defaults to 12.
  ///
  /// This is the same size as default labelMedium in the text theme.
  /// FCS uses this for both M2 and M3 mode. Flutter SDK uses 12 in M3 and
  /// 16 in M23 from its bodyLarge text theme.
  ///
  /// * [unselectedLabelSize]
  /// The size of the text label on unselected [NavigationRail] items.
  ///
  /// If defined, it overrides the font size on effective label TextStyle
  /// on selected item.
  ///
  /// If not defined, defaults to 12.
  ///
  /// This is the same size as default labelMedium in the text theme.
  /// FCS uses this for both M2 and M3 mode. Flutter SDK uses 12 in M3 and
  /// 16 in M23 from its bodyLarge text theme.
  ///
  /// * [selectedLabelSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [NavigationRail]'s selected label text color.
  ///
  /// When undefined, if [backgroundSchemeColor] is defined, its
  /// contrasting on color will be used, if it is also undefined
  /// [SchemeColor.onSurface] will be used.
  ///
  /// Flutter M2 default is primary, M3 default is onSurface.
  ///
  /// * [unselectedLabelSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [NavigationRail]'s unselected label text color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also undefined,
  /// then this defaults to [SchemeColor.onSurfaceVariant].
  ///
  /// Flutter Material-2 default is onSurface with opacity 0.64,
  /// In Flutter version 3.38 and earlier, the Material-3 default is also
  /// onSurface. This is a spec BUG in Flutter's Material-3 defaults, it should
  /// be onSurfaceVariant based on M3 specification
  /// https://m3.material.io/components/navigation-rail/specs
  ///
  /// * [mutedUnselectedLabel]
  /// If true, the unselected label in the [NavigationRail] use a more
  /// muted color version of the color defined by
  /// [unselectedLabelSchemeColor].
  ///
  /// The "muting" is done by using unselected [unselectedLabelSchemeColor]
  /// color and applying:
  ///
  /// .blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
  ///
  /// on on it
  ///
  /// .withAlpha([kUnselectedAlphaBlend]).
  ///
  /// If undefined, defaults to false.
  ///
  /// * [selectedIconSize]
  /// The size of the icon on selected [NavigationRail] item.
  ///
  /// If undefined, it defaults to 24.
  ///
  /// Flutter M2 and M3 defaults are 24.
  ///
  /// * [unselectedIconSize]
  /// The size of the icon on unselected [NavigationRail] items.
  ///
  /// If undefined, defaults to [selectedIconSize].
  ///
  /// * [selectedIconSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use for
  /// the [NavigationRail]'s selected item icon color.
  ///
  /// If undefined, and [indicatorSchemeColor] is also
  /// undefined, then defaults to [SchemeColor.onSecondaryContainer].
  /// If undefined, but [indicatorSchemeColor] is defined, then
  /// it defaults to the contrast onColor pair of the indicator color
  /// [indicatorSchemeColor]
  ///
  /// Flutter Material-2 default is primary, Material-3 default is
  /// onSecondaryContainer.
  ///
  /// * [unselectedIconSchemeColor]
  /// Select which color from the passed in [ColorScheme] to use for
  /// the [NavigationRail]'s unselected items icon color.
  ///
  /// When undefined, if [backgroundSchemeColor] is
  /// using any of the surface colors, the default on pair used will be
  /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
  /// that is the typical contrast color for surface colors.
  /// This is to make the unselected labels and icons look more muted.
  ///
  /// If other [backgroundSchemeColor] colors are used,
  /// while this value is undefined, their default contrasting onColor will
  /// be used. If the [backgroundSchemeColor] is also undefined,
  /// then this defaults to [SchemeColor.onSurfaceVariant].
  ///
  /// Flutter's Material-2 default is onSurface and in Material-3 it is
  /// onSurfaceVariant.
  ///
  /// * [mutedUnselectedIcon]
  /// If true, the unselected icon in the [NavigationRail] use a more muted
  /// color version of the color defined by [unselectedIconSchemeColor].
  ///
  /// The "muting" is done by using unselected [unselectedIconSchemeColor]
  /// color and applying:
  ///
  /// .blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
  ///
  /// on on it
  ///
  /// .withAlpha([kUnselectedAlphaBlend]).
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useIndicator]
  /// Whether or not the selected [NavigationRail] item should include a
  /// [NavigationIndicator].
  ///
  /// If `true`, adds a rounded [NavigationIndicator] behind the selected
  /// destination's icon.
  ///
  /// Defaults to true.
  ///
  /// In Flutter defaults, the default is true in M3 and false in M2.
  ///
  /// * [indicatorSchemeColor]
  /// Select which color from the theme [ColorScheme] to use as base for
  /// the selected [NavigationRail]'s highlighted item.
  ///
  /// If undefined, defaults to [SchemeColor.secondaryContainer].
  ///
  /// Flutter defaults to secondary in M2 and to secondaryContainer in M3.
  ///
  /// * [backgroundSchemeColor]
  /// Select which color from the theme's [ColorScheme] to use as background
  /// color for the [NavigationRail].
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If undefined, defaults to [SchemeColor.surface].
  ///
  /// * [opacity]
  /// NavigationRail background opacity.
  ///
  /// If undefined, defaults to 1, fully opaque.
  ///
  /// * [elevation]
  /// [NavigationRail] elevation.
  ///
  /// If undefined, defaults to [kNavigationRailElevation] = 0.
  ///
  /// Elevation 0 is default for Flutter SDK in both M2 and M3 mode as well.
  ///
  /// * [labelType]
  /// Defines the layout and behavior of the labels for the
  /// un-extended [NavigationRail].
  ///
  /// The type are:
  ///
  /// * [NavigationRailLabelType.none] labels on rail items are never shown.
  /// * [NavigationRailLabelType.selected] label is only shown on selected
  ///   rail item.
  /// * [NavigationRailLabelType.all] label is shown on all rail items.
  ///
  /// When a navigation rail is extended, the labels are always shown.
  ///
  /// If null, then the default behavior is [NavigationRailLabelType.none].
  ///
  /// * [groupAlignment]
  /// The vertical alignment for the group of [NavigationRail.destinations]
  /// within the [NavigationRail].
  ///
  /// The [NavigationRailDestination]s are grouped together with the
  /// [NavigationRail.trailing] widget, between the [NavigationRail.leading]
  /// widget and the bottom of the rail.
  ///
  /// The value must be between -1.0 and 1.0.
  ///
  /// If [groupAlignment] is -1.0, then the items are aligned to the top. If
  /// [groupAlignment] is 0.0, then the items are aligned to the center. If
  /// [groupAlignment] is 1.0, then the items are aligned to the bottom.
  ///
  /// The default is -1.0.
  ///
  /// * [indicatorAlpha]
  /// The alpha value used on selection color of the selection indicator on
  /// the [NavigationRail].
  ///
  /// I undefined, defaults to [kNavigationBarIndicatorAlpha],
  /// which is 0x3D = 61 = 24%.
  ///
  /// The default is the same value as Widget SDK default behavior uses on its
  /// used secondary color on its indicator color on the [NavigationBar],
  /// here we use same value on the [NavigationRail].
  /// needed later.
  ///
  /// * [indicatorRadius]
  /// Border radius of the selection indicator on the [NavigationBar].
  ///
  /// In M2 mode and when rail is extended, the indicator is always circular.
  ///
  /// If not defined, defaults to [StadiumBorder].
  ///
  /// FCS default, follows the Material M3 guide:
  /// https://m3.material.io/components/navigation-rail/specs.
  ///
  /// * [unselectedAlphaBlend]
  /// The icon color alpha blend value for unselected items, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
  /// 0x66 = 102 = 40%.
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [unselectedAlpha]
  /// The icon alpha value for unselected item, used on icon when
  /// [mutedUnselectedIcon] is true and on label when
  /// [mutedUnselectedLabel] is true.
  ///
  /// Defaults to [kUnselectedAlphaBlend], which is
  /// 0xA5 = 165 = 65%
  ///
  /// This setting is not exposed via [FlexSubThemesData], but can be if
  /// needed later.
  ///
  /// * [minWidth]
  /// Overrides the default value of [NavigationRail]'s minimum width when it
  /// is not extended.
  ///
  /// If not defined, defaults to M3 spec default value 80 dp.
  ///
  /// Flutter SDK uses 72 in M2 mode and 80 dp in M3 mode.
  ///
  /// * [minExtendedWidth]
  /// Overrides the default value of [NavigationRail]'s minimum width when it
  /// is extended.
  ///
  /// If not defined, defaults to M3 spec default value 256 dp.
  ///
  /// Flutter M2 and M3 use 256 dp as default.
  ///
  /// * [useMaterial3] **Deprecated**
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// The M2/M3 SDK defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  ///
  /// * [useFlutterDefaults] **Deprecated**
  /// Set to true to use Flutter SDK defaults for [NavigationRail]
  /// theme when its properties are undefined (null) instead of using
  /// [FlexColorScheme]'s own defaults.
  ///
  /// Recommend keeping it **false** for a more color harmonized component
  /// theme starting point. This flag may be helpful if you want to create
  /// custom sub-themes starting from less opinionated settings.
  ///
  /// Differences when flag is false versus true are:
  ///
  /// ```text
  ///                    FCS defaults    M2 defaults      useMaterial3:true
  /// useFlutterDefaults false           true             true
  /// results in:
  ///
  /// - background       background      surface          surface
  /// - indicator        primary op24%   secondary op24%  secondaryContainer
  /// - selected icon    primary         primary          onSecondaryContainer
  /// - unselected icon  onSurface       onSurface op64%  onSurfaceVariant
  /// - selected label   primary         primary          onSurface
  /// - unSelected label onSurface       onSurface op64%  onSurface
  /// - TextTheme        labelMedium     bodyText1        labelMedium
  /// ```
  /// FCS further applies both an alpha blend and slight opacity to
  /// unselected icon and unselected label, but only if
  /// [FlexSubThemesData.navigationRailMutedUnselectedIcon] and
  /// are [FlexSubThemesData.navigationRailMutedUnselectedLabel] true
  /// respectively, this also applies to undefined color inputs.
  ///
  /// If you want a style that is consistent by default across
  /// [BottomNavigationBar], [NavigationBar] and [NavigationRail],
  /// prefer keeping this setting false.
  ///
  /// Defaults to null.
  static NavigationRailThemeData navigationRailTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Optional text style for the [NavigationRail] labels.
    ///
    /// The size and colors defined in any of the text size and color properties
    /// are applied as overrides on this text style.
    final TextStyle? labelTextStyle,

    /// The size of the text label on selected [NavigationRail] item.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on selected item.
    ///
    /// If not defined, defaults to 12.
    ///
    /// This is the same size as default labelMedium in the text theme.
    /// FCS uses this for both M2 and M3 mode. Flutter SDK uses 12 in M3 and
    /// 16 in M23 from its bodyLarge text theme.
    final double? selectedLabelSize,

    /// The size of the text label on unselected [NavigationRail] items.
    ///
    /// If defined, it overrides the font size on effective label TextStyle
    /// on selected item.
    ///
    /// If not defined, defaults to 12.
    ///
    /// This is the same size as default labelMedium in the text theme.
    /// FCS uses this for both M2 and M3 mode. Flutter SDK uses 12 in M3 and
    /// 16 in M23 from its bodyLarge text theme.
    final double? unselectedLabelSize,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [NavigationRail]'s selected label text color.
    ///
    /// When undefined, if [backgroundSchemeColor] is defined, its
    /// contrasting on color will be used, if it is also undefined
    /// [SchemeColor.onSurface] will be used.
    ///
    /// Flutter M2 default is primary, M3 default is onSurface.
    final SchemeColor? selectedLabelSchemeColor,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [NavigationRails]'s unselected label text color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also undefined,
    /// then this defaults to [SchemeColor.onSurfaceVariant].
    ///
    /// Flutter Material-2 default is onSurface with opacity 0.64,
    /// In Flutter version 3.38 and earlier, the Material-3 default is also
    /// onSurface. This is a spec BUG in Flutter's Material-3 defaults, it
    /// should be onSurfaceVariant based on M3 specification
    /// https://m3.material.io/components/navigation-rail/specs
    final SchemeColor? unselectedLabelSchemeColor,

    // TODO(rydmike): Commented as part of deprecation of blendTextTheme.
    //
    // An alternative unselected item color.
    //
    // It is used as fallback if [unselectedIconSchemeColor] is not specified,
    // before its normal default fallbacks.
    //
    // The color is typically used to provide the color created by blended or
    // tinted text theme, when it is being used by FlexColorScheme as an
    // `onSurfaceVariant` equivalent style, but a bit more primary tinted.
    //
    // FlexColorScheme passes in its `onSurfaceVariantBlendedTextStyle` when
    // a blended TextTheme is being used.
    // final Color? altUnselectedColor,

    /// If true, the unselected label in the [NavigationRail] use a more
    /// muted color version of the color defined by
    /// [unselectedLabelSchemeColor].
    ///
    /// The "muting" is done by using unselected [unselectedLabelSchemeColor]
    /// color and applying:
    ///
    /// .blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
    ///
    /// on on it
    ///
    /// .withAlpha([kUnselectedAlphaBlend]).
    ///
    /// If undefined, defaults to false.
    final bool? mutedUnselectedLabel,

    /// The size of the icon on selected [NavigationRail] item.
    ///
    /// If undefined, it defaults to 24.
    ///
    /// Flutter M2 and M3 defaults are 24.
    final double? selectedIconSize,

    /// The size of the icon on unselected [NavigationRail] items.
    ///
    /// If undefined, defaults to [selectedIconSize].
    final double? unselectedIconSize,

    /// Select which color from the theme's [ColorScheme] to use for
    /// the [NavigationRail]'s selected item icon color.
    ///
    /// If undefined, and [indicatorSchemeColor] is also
    /// undefined, then defaults to [SchemeColor.onSecondaryContainer].
    /// If undefined, but [indicatorSchemeColor] is defined, then
    /// it defaults to the contrast onColor pair of the indicator color
    /// [indicatorSchemeColor]
    ///
    /// Flutter Material-2 default is primary, Material-3 default is
    /// onSecondaryContainer.
    final SchemeColor? selectedIconSchemeColor,

    /// Select which color from the passed in [ColorScheme] to use for
    /// the [NavigationRail]'s unselected items icon color.
    ///
    /// When undefined, if [backgroundSchemeColor] is
    /// using any of the surface colors, the default on pair used will be
    /// [SchemeColor.onSurfaceVariant], instead of [SchemeColor.onSurface]
    /// that is the typical contrast color for surface colors.
    /// This is to make the unselected labels and icons look more muted.
    ///
    /// If other [backgroundSchemeColor] colors are used,
    /// while this value is undefined, their default contrasting onColor will
    /// be used. If the [backgroundSchemeColor] is also undefined,
    /// then this defaults to [SchemeColor.onSurfaceVariant].
    ///
    /// Flutter's Material-2 default is onSurface and in Material-3 it is
    /// onSurfaceVariant.
    final SchemeColor? unselectedIconSchemeColor,

    /// If true, the unselected icon in the [NavigationRail] use a more muted
    /// color version of the color defined by [unselectedIconSchemeColor].
    ///
    /// The "muting" is done by using unselected [unselectedIconSchemeColor]
    /// color and applying:
    ///
    /// .blendAlpha(unselected color, [kUnselectedBackgroundPrimaryAlphaBlend])
    ///
    /// on on it
    ///
    /// .withAlpha([kUnselectedAlphaBlend]).
    ///
    /// If undefined, defaults to false.
    final bool? mutedUnselectedIcon,

    /// Whether or not the selected [NavigationRail] item should include a
    /// [NavigationIndicator].
    ///
    /// If `true`, adds a rounded [NavigationIndicator] behind the selected
    /// destination's icon.
    ///
    /// Defaults to true.
    ///
    /// In Flutter defaults, the default is true in M3 and false in M2.
    final bool? useIndicator,

    /// Select which color from the theme [ColorScheme] to use as base for
    /// the selected [NavigationRails]'s highlighted item.
    ///
    /// If undefined, defaults to [SchemeColor.secondaryContainer].
    ///
    /// Flutter defaults to secondary in M2 and to secondaryContainer in M3.
    final SchemeColor? indicatorSchemeColor,

    /// Select which color from the theme's [ColorScheme] to use as background
    /// color for the [NavigationRail].
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If undefined, defaults to [SchemeColor.surface].
    final SchemeColor? backgroundSchemeColor,

    /// NavigationRail background opacity.
    ///
    /// If undefined, defaults to 1, fully opaque.
    final double? opacity,

    /// [NavigationRail] elevation.
    ///
    /// If undefined, defaults to [kNavigationRailElevation] = 0.
    ///
    /// Elevation 0 is default for Flutter SDK in both M2 and M3 mode as well.
    final double? elevation,

    /// Defines the layout and behavior of the labels for the
    /// un-extended [NavigationRail].
    ///
    /// The type are:
    ///
    /// * [NavigationRailLabelType.none] labels on rail items are never shown.
    /// * [NavigationRailLabelType.selected] label is only shown on selected
    ///   rail item.
    /// * [NavigationRailLabelType.all] label is shown on all rail items.
    ///
    /// When a navigation rail is [extended], the labels are always shown.
    ///
    /// If null, then the default behavior is [NavigationRailLabelType.none].
    final NavigationRailLabelType? labelType,

    /// The vertical alignment for the group of [destinations] within the
    /// [NavigationRail].
    ///
    /// The [NavigationRailDestination]s are grouped together with the
    /// [trailing] widget, between the [leading] widget and the bottom
    /// of the rail.
    ///
    /// The value must be between -1.0 and 1.0.
    ///
    /// If [groupAlignment] is -1.0, then the items are aligned to the top. If
    /// [groupAlignment] is 0.0, then the items are aligned to the center. If
    /// [groupAlignment] is 1.0, then the items are aligned to the bottom.
    ///
    /// The default is -1.0.
    final double? groupAlignment,

    /// The alpha value used on selection color of the selection indicator on
    /// the [NavigationRail].
    ///
    /// I undefined, defaults to [kNavigationBarIndicatorAlpha],
    /// which is 0x3D = 61 = 24%.
    ///
    /// The default is the same value as Widget SDK default behavior uses on its
    /// used secondary color on its indicator color on the [NavigationBar],
    /// here we use same value on the [NavigationRail].
    /// needed later.
    final int? indicatorAlpha,

    /// Border radius of the selection indicator on the [NavigationBar].
    ///
    /// In M2 mode and when rail is extended, the indicator is always circular.
    ///
    /// If not defined, defaults to [StadiumBorder].
    ///
    /// FCS default, follows the Material M3 guide:
    /// https://m3.material.io/components/navigation-rail/specs.
    final double? indicatorRadius,

    /// The icon color alpha blend value for unselected items, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedBackgroundPrimaryAlphaBlend], which is
    /// 0x66 = 102 = 40%.
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlphaBlend = kUnselectedBackgroundPrimaryAlphaBlend,

    /// The icon alpha value for unselected item, used on icon when
    /// [mutedUnselectedIcon] is true and on label when
    /// [mutedUnselectedLabel] is true.
    ///
    /// Defaults to [kUnselectedAlphaBlend], which is
    /// 0xA5 = 165 = 65%
    ///
    /// This setting is not exposed via [FlexSubThemesData], but can be if
    /// needed later.
    final int unselectedAlpha = kUnselectedAlphaBlend,

    /// Overrides the default value of [NavigationRail]'s minimum width when it
    /// is not extended.
    ///
    /// If not defined, defaults to M3 spec default value 80 dp.
    ///
    /// Flutter SDK uses 72 in M2 mode and 80 dp in M3 mode.
    final double? minWidth,

    /// Overrides the default value of [NavigationRail]'s minimum width when it
    /// is extended.
    ///
    /// If not defined, defaults to M3 spec default value 256 dp.
    ///
    /// Flutter M2 and M3 use 256 dp as default.
    final double? minExtendedWidth,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// The M2/M3 SDK defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    @Deprecated(
      'The useMaterial3 flag no longer has any function in this '
      'component theme and is deprecated. It will be removed in v9.',
    )
    final bool? useMaterial3,

    /// Set to true to use Flutter SDK defaults for [NavigationRail]
    /// theme when its properties are undefined (null) instead of using
    /// [FlexColorScheme]'s own defaults.
    ///
    /// Recommend keeping it **false** for a more color harmonized component
    /// theme starting point. This flag may be helpful if you want to create
    /// custom sub-themes starting from less opinionated settings.
    ///
    /// Differences when flag is false versus true are:
    ///
    /// ```text
    ///                    FCS defaults    M2 defaults      useMaterial3:true
    /// useFlutterDefaults false           true             true
    /// results in:
    ///
    /// - background       background      surface          surface
    /// - indicator        primary op24%   secondary op24%  secondaryContainer
    /// - selected icon    primary         primary          onSecondaryContainer
    /// - unselected icon  onSurface       onSurface op64%  onSurfaceVariant
    /// - selected label   primary         primary          onSurface
    /// - unSelected label onSurface       onSurface op64%  onSurface
    /// - TextTheme        labelMedium     bodyText1        labelMedium
    /// ```
    /// FCS further applies both an alpha blend and slight opacity to
    /// unselected icon and unselected label, but only if
    /// [FlexSubThemesData.navigationRailMutedUnselectedIcon] and
    /// are [FlexSubThemesData.navigationRailMutedUnselectedLabel] true
    /// respectively, this also applies to undefined color inputs.
    ///
    /// If you want a style that is consistent by default across
    /// [BottomNavigationBar], [NavigationBar] and [NavigationRail],
    /// prefer keeping this setting false.
    ///
    /// Defaults to null.
    @Deprecated(
      'The `useFlutterDefaults` is deprecated, it no longer has any '
      'function and will be removed in v9. FlexColorScheme in M3 mode '
      'defaults to using mostly Flutter defaults styles. '
      'For other configurations modify the theme as desired. '
      'In M2 mode FCS will continue to use its own opinionated defaults for '
      'as long as M2 exists.',
    )
    final bool? useFlutterDefaults,
  }) =>
      _navigationRailTheme(
        colorScheme: colorScheme,
        labelTextStyle: labelTextStyle,
        selectedLabelSize: selectedLabelSize,
        unselectedLabelSize: unselectedLabelSize,
        selectedLabelSchemeColor: selectedLabelSchemeColor,
        unselectedLabelSchemeColor: unselectedLabelSchemeColor,
        mutedUnselectedLabel: mutedUnselectedLabel,
        selectedIconSize: selectedIconSize,
        unselectedIconSize: unselectedIconSize,
        selectedIconSchemeColor: selectedIconSchemeColor,
        unselectedIconSchemeColor: unselectedIconSchemeColor,
        mutedUnselectedIcon: mutedUnselectedIcon,
        useIndicator: useIndicator,
        indicatorSchemeColor: indicatorSchemeColor,
        backgroundSchemeColor: backgroundSchemeColor,
        opacity: opacity,
        elevation: elevation,
        labelType: labelType,
        groupAlignment: groupAlignment,
        indicatorAlpha: indicatorAlpha,
        indicatorRadius: indicatorRadius,
        unselectedAlphaBlend: unselectedAlphaBlend,
        unselectedAlpha: unselectedAlpha,
        minWidth: minWidth,
        minExtendedWidth: minExtendedWidth,
        // ignore: deprecated_member_use_from_same_package, legacy support.
        useMaterial3: useMaterial3,
        // ignore: deprecated_member_use_from_same_package, legacy support.
        useFlutterDefaults: useFlutterDefaults,
      );

  /// An opinionated [OutlinedButtonThemeData] theme.
  ///
  /// Requires a [ColorScheme]. The color scheme would typically be equal the
  /// color scheme also used to define the color scheme for your app theme.
  ///
  /// The adjustable button corner [radius] defaults to 20. This is the new
  /// default in M3, Flutter SDK M2 defaults to 4.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the button.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [outlineSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color, that the
  /// [OutlinedButton] uses as its outline color.
  ///
  /// If [useMaterial3] is false, and the [baseSchemeColor] is not defined,
  /// the [baseSchemeColor] is used as default button
  /// outline color, following M2 style.
  ///
  /// If [useMaterial3] is true, and the [outlineSchemeColor] is
  /// not defined, the [ColorScheme.outline] is used as default button
  /// outline color in M3 style.
  ///
  /// * [radius]
  /// The button corner border radius.
  ///
  /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
  /// M3 it defaults to Stadium border based on
  /// https://m3.material.io/components/buttons/specs
  ///
  /// * [pressedOutlineWidth]
  /// The outline thickness when the button is pressed or in error state.
  ///
  /// If null, defaults to [kThickBorderWidth] = 2, when
  /// [useMaterial3] is false, and to 1 when [useMaterial3] is true.
  ///
  /// * [outlineWidth]
  /// The outline thickness when the button is not selected and not pressed.
  ///
  /// If null, defaults to [kThinBorderWidth] = 1.0.
  ///
  /// * [padding]
  /// Padding for the button theme.
  ///
  /// Defaults to null and uses `styleFrom` constructors default padding.
  ///
  /// M3 has more horizontal padding 24dp, but the tighter default padding
  /// in M2 that is 16dp looks fine as well when using stadium borders
  /// as in M3.
  ///
  /// If null and [useMaterial3] is true in the context, the correct M3
  /// button theme default computed button padding for M3 will be used.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
  /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
  /// [useMaterial3] is true.
  ///
  /// * [textStyle]
  /// The style for the button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// foreground color is used instead.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashFactory]
  /// Creates the [InkWell] splash factory, which defines the appearance of
  /// "ink" splashes that occur in response to taps.
  ///
  /// In M2 mode FlexColorScheme passes in the effective splashFactory
  /// from splashFactory override value or the result from
  /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
  /// null and the default comes via ThemeData.splashFactory, that is has
  /// also defined.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static OutlinedButtonThemeData outlinedButtonTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the button.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? baseSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color, that the
    /// [OutlinedButton] uses as its outline color.
    ///
    /// If [useMaterial3] is false, and the [baseSchemeColor] is not defined,
    /// the [baseSchemeColor] is used as default button
    /// outline color, following M2 style.
    ///
    /// If [useMaterial3] is true, and the [outlineSchemeColor] is
    /// not defined, the [ColorScheme.outline] is used as default button
    /// outline color in M3 style.
    final SchemeColor? outlineSchemeColor,

    /// The button corner border radius.
    ///
    /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
    /// M3 it defaults to Stadium border based on
    /// https://m3.material.io/components/buttons/specs
    final double? radius,

    /// The outline thickness when the button is pressed or in error state.
    ///
    /// If null, defaults to [kThickBorderWidth] = 2, when
    /// [useMaterial3] is false, and to 1 when [useMaterial3] is true.
    final double? pressedOutlineWidth,

    /// The outline thickness when the button is not selected and not pressed.
    ///
    /// If null, defaults to [kThinBorderWidth] = 1.0.
    final double? outlineWidth,

    /// Padding for the button theme.
    ///
    /// Defaults to null and uses `styleFrom` constructors default padding.
    ///
    /// M3 has more horizontal padding 24dp, but the tighter default padding
    /// in M2 that is 16dp looks fine as well when using stadium borders
    /// as in M3.
    ///
    /// If null and [useMaterial3] is true in the context, the correct M3
    /// button theme default computed button padding for M3 will be used.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
    /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
    /// [useMaterial3] is true.
    final Size? minButtonSize,

    /// The style for the button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// [foregroundColor] is used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Creates the [InkWell] splash factory, which defines the appearance of
    /// "ink" splashes that occur in response to taps.
    ///
    /// In M2 mode FlexColorScheme passes in the effective splashFactory
    /// from splashFactory override value or the result from
    /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
    /// null and the default comes via ThemeData.splashFactory, that is has
    /// also defined.
    final InteractiveInkFeatureFactory? splashFactory,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _outlinedButtonTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        outlineSchemeColor: outlineSchemeColor,
        radius: radius,
        pressedOutlineWidth: pressedOutlineWidth,
        outlineWidth: outlineWidth,
        padding: padding,
        minButtonSize: minButtonSize,
        textStyle: textStyle,
        useTintedInteraction: useTintedInteraction,
        splashFactory: splashFactory,
        useTintedDisable: useTintedDisable,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [PopupMenuThemeData] with custom corner radius.
  ///
  /// When used by [FlexColorScheme] the corner radius of popup menus follows
  /// the global [FlexSubThemesData.defaultRadius] if defined, until and
  /// including 10 dp. After which it stays at 10 dp. If you need a higher
  /// corner radius on popup menus than 10 dp, with [FlexColorScheme]
  /// you will have to explicitly override
  /// [FlexSubThemesData.popupMenuRadius].
  ///
  /// It will not look very good when it is
  /// over 10dp. The highlight inside the menu will start to overflow the
  /// corners and is not clipped along the border radius. The underlying Widget
  /// is not designed with this high border rounding in mind. This makes sense
  /// since it does not look good with too much rounding on a small menu.
  ///
  /// The built-in behavior in FlexColorScheme allows it to match at low
  /// inherited radius values from [FlexSubThemesData.defaultRadius] but to
  /// also stay below the usable max rounding automatically at higher global
  /// border radius values.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color is use as
  /// background color by [PopupMenuButton].
  ///
  /// Any passed in background color via the [color] property
  /// will override this [backgroundSchemeColor] value.
  ///
  /// If not defined, and [color] is undefined, then it defaults via Flutter
  /// SDK defaults to:
  /// - In Material-2 the default is [ThemeData.cardColor].
  /// - In Material-3 the default is [ColorScheme.surfaceContainer].
  /// Typically they are the same.
  ///
  /// * [foregroundSchemeColor]
  /// Defines which [Theme] based [ColorScheme] based color is use as
  /// foreground color by [PopupMenuButton].
  ///
  /// If not defined and [backgroundSchemeColor] is, then it will default to
  /// the schemeColorPair for the [backgroundSchemeColor]. If
  /// [backgroundSchemeColor] is also null, then it defaults to Flutter SDK
  /// default foreground color [ColorScheme.onSurface].
  ///
  /// * [color]
  /// The background color of [PopupMenuButton].
  ///
  /// If not defined, and [backgroundSchemeColor] is undefined, then it
  /// defaults via Flutter SDK defaults to:
  /// - In Material-2 the default is [ThemeData.cardColor].
  /// - In Material-3 the default is [ColorScheme.surfaceContainer].
  /// Typically they are the same.
  ///
  /// * [textStyle]
  /// The TextStyle of the selectable items on the [PopupMenuButton].
  ///
  /// The default is [TextTheme.labelLarge], via Flutter SDK defaults.
  ///
  /// * [radius]
  /// Popup menu corner radius.
  ///
  /// If not defined, defaults to 4 via Flutter SDK defaults.
  ///
  /// * [elevation]
  /// The elevation of the [PopupMenuButton].
  ///
  /// If not defined, then if [ThemeData.useMaterial3] is:
  /// - false : defaults to 8 dp
  /// - true  : defaults to 3 dp.
  /// via Flutter SDK widget default values.
  /// FCS will pass in [kPopupMenuM3Elevation] (3), if Material3 is true
  /// and [kPopupMenuM2Elevation] (6), if it is false.
  ///
  /// * [surfaceTintColor]
  /// The color used as an alpha overlay tint color on the effective
  /// [PopupMenuButton] background color.
  static PopupMenuThemeData popupMenuTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    final ColorScheme? colorScheme,

    /// Defines which [Theme] based [ColorScheme] based color is use as
    /// background color by [PopupMenuButton].
    ///
    /// Any passed in background color via the [color] property
    /// will override this [backgroundSchemeColor] value.
    ///
    /// If not defined, and [color] is undefined, then it defaults via Flutter
    /// SDK defaults to:
    /// - [useMaterial3] = false : default theme.cardColor.
    /// - [useMaterial3] = true  : default theme.colorScheme.surfaceContainer.
    /// Usually they are the same.
    final SchemeColor? backgroundSchemeColor,

    /// Defines which [Theme] based [ColorScheme] based color is use as
    /// foreground color by [PopupMenuButton].
    ///
    /// If not defined and [backgroundSchemeColor] is, then it will default to
    /// the schemeColorPair for the [backgroundSchemeColor]. If
    /// [backgroundSchemeColor] is also null, then it defaults to Flutter SDK
    /// default foreground color [ColorScheme.onSurface].
    final SchemeColor? foregroundSchemeColor,

    /// The background color of [PopupMenuButton].
    ///
    /// If not defined, and [backgroundSchemeColor] is undefined, then it
    /// defaults via Flutter SDK defaults to:
    /// - [useMaterial3] = false : defaults theme.cardColor.
    /// - [useMaterial3] = true  : defaults theme.colorScheme.surfaceContainer.
    /// Usually they are the same.
    final Color? color,

    /// The TextStyle of the selectable items on the [PopupMenuButton].
    ///
    /// The default is [textTheme.labelLarge], via Flutter SDK defaults.
    final TextStyle? textStyle,

    /// Popup menu corner radius.
    ///
    /// If not defined, defaults to 4 via Flutter SDK defaults.
    final double? radius,

    /// The elevation of the [PopupMenuButton].
    ///
    /// If not defined, then if [useMaterial3] is:
    /// - false : defaults to 8 dp
    /// - true  : defaults to 3 dp.
    /// via Flutter SDK widget default values.
    /// FCS will pass in [kPopupMenuM3Elevation] (3), if Material3 is true
    /// and [kPopupMenuM2Elevation] (6), if it is false.
    final double? elevation,

    /// The color used as an alpha overlay tint color on the effective
    /// [PopupMenuButton] background color.
    final Color? surfaceTintColor,
  }) =>
      _popupMenuTheme(
          colorScheme: colorScheme,
          backgroundSchemeColor: backgroundSchemeColor,
          foregroundSchemeColor: foregroundSchemeColor,
          color: color,
          textStyle: textStyle,
          radius: radius,
          elevation: elevation,
          surfaceTintColor: surfaceTintColor);

  /// An opinionated [ProgressIndicatorThemeData] theme for the
  /// [CircularProgressIndicator] and [LinearProgressIndicator].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [baseSchemeColor]
  /// The color of the [ProgressIndicator]'s indicator.
  ///
  /// If null, then it will use [ColorScheme.primary] of the ambient
  /// [ThemeData.colorScheme].
  ///
  /// * [linearTrackSchemeColor]
  /// Color of the track being filled by the linear indicator.
  ///
  /// If [linearTrackSchemeColor] is null then in M2 mode
  /// the ambient theme's deprecated `ColorScheme.background` color is used
  /// In M3 mode [ColorScheme.secondaryContainer] is used as default.
  ///
  /// * [linearMinHeight]
  /// The minimum height of the line used to draw the linear indicator.
  ///
  /// If [linearMinHeight] is null it defaults to 4dp.
  ///
  /// * [circularTrackSchemeColor]
  /// Scheme color of the circular track being filled by circular indicator.
  ///
  /// If [circularTrackSchemeColor] is null the track will not be painted.
  ///
  /// * [refreshBackgroundSchemeColor]
  /// Background scheme color fill under the circle of the refresh indicator.
  ///
  /// If [refreshBackgroundSchemeColor] is null then the ambient
  /// theme's [ThemeData.canvasColor]
  /// will be used. In FCs this defaults to [ColorScheme.surface].
  ///
  /// * [linearRadius]
  /// The border radius of both the linear indicator and the track.
  ///
  /// Defaults to circular radius of 2 in Material-3, which produces a
  /// rounded shape with a rounded indicator. In Material-2 mode it defaults
  /// to [BorderRadius.zero], which produces a rectangular shape
  /// with a rectangular indicator.
  ///
  /// Providing a values of 0 or less will result in [BorderRadius.zero].
  ///
  /// * [stopIndicatorSchemeColor]
  /// The scheme color of the stop indicator of the [LinearProgressIndicator].
  ///
  /// If [year2023] is true/null or [ThemeData.useMaterial3] is false, then
  /// no stop indicator will be drawn.
  ///
  /// Defaults to [SchemeColor.primary].
  ///
  /// * [stopIndicatorRadius]
  /// Overrides the stop indicator radius of the [LinearProgressIndicator].
  ///
  /// If [year2023] is true or
  /// [ThemeData.useMaterial3] is false, then no stop indicator will be drawn.
  ///
  /// * [strokeWidth]
  /// The width of the line used to draw the circle in  the
  /// [CircularProgressIndicator].
  ///
  /// * [strokeAlign]
  /// The relative position of the stroke on a [CircularProgressIndicator].
  ///
  /// Values typically range from -1.0
  /// ([CircularProgressIndicator.strokeAlignInside], inside stroke)
  /// to 1.0 ([CircularProgressIndicator.strokeAlignOutside], outside stroke),
  /// without any bound constraints (e.g., a value of -2.0 is not typical,
  /// but allowed).
  /// A value of 0 ([CircularProgressIndicator.strokeAlignCenter]) will center
  /// the border on the edge of the widget.
  ///
  /// If [year2023] is true, then the default value is
  /// [CircularProgressIndicator.strokeAlignCenter].
  /// Otherwise, the default value is
  /// [CircularProgressIndicator.strokeAlignInside].
  ///
  /// * [strokeCap]
  /// Overrides the stroke cap of the [CircularProgressIndicator].
  ///
  /// Determines the shape of the stroke ends of the progress indicator.
  /// By default, [strokeCap] is null.
  /// When value is null (indeterminate), the stroke ends are set to
  /// [StrokeCap.square]. When value is not null, the stroke
  /// ends are set to [StrokeCap.butt].
  ///
  /// Setting [strokeCap] to [StrokeCap.round] will result in a rounded end.
  /// Setting [strokeCap] to [StrokeCap.butt] with value == null will result
  /// in a slightly different indeterminate animation; the indicator
  /// completely disappears and reappears on its minimum value.
  /// Setting [strokeCap] to [StrokeCap.square] with `value` != null will
  /// result in a different display of value. The indicator will start
  /// drawing from slightly less than the start, and end slightly after
  /// the end. This will produce an alternative result, as the
  /// default behavior, for example, that a value of 0.5 starts at 90
  /// degrees and ends at 270 degrees. With [StrokeCap.square], it could
  /// start 85 degrees and end at 275 degrees.
  ///
  /// * [constraints]
  /// Defines minimum and maximum sizes for a [CircularProgressIndicator].
  ///
  /// If null, in Material-2 or Material-3 when [year2023] is true or null,
  /// defaults to a minimum width and height of 36 pixels.
  /// If Material-3 mode and [year2023] is false,
  /// defaults to a minimum width and height of 40 pixels.
  ///
  /// * [trackGap]
  /// Overrides the active indicator and the background track gap.
  ///
  /// If [year2023] is true or
  /// [ThemeData.useMaterial3] is false, then no track gap will be drawn.
  ///
  /// * [circularTrackPadding]
  /// Overrides the padding of the [CircularProgressIndicator].
  ///
  /// * [year2023]
  /// When true, the [CircularProgressIndicator] and [LinearProgressIndicator]
  /// will use the 2023 Material-3 appearance. Defaults to true.
  ///
  /// If this is set to false, the [CircularProgressIndicator] and
  /// [LinearProgressIndicator] will use the latest Material-3 appearance,
  /// which was introduced in December 2023 and become common in 2024.
  ///
  /// If [ThemeData.useMaterial3] is false, then this property is ignored.
  static ProgressIndicatorThemeData progressIndicatorTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// The color of the [ProgressIndicator]'s indicator.
    ///
    /// If null, then it will use [ColorScheme.primary] of the ambient
    /// [ThemeData.colorScheme].
    final SchemeColor? baseSchemeColor,

    /// Color of the track being filled by the linear indicator.
    ///
    /// If [linearTrackSchemeColor] is null then in M2 mode
    /// the ambient theme's deprecated [ColorScheme.background] color is used
    /// In M3 mode [ColorScheme.secondaryContainer] is used as default.
    final SchemeColor? linearTrackSchemeColor,

    /// The minimum height of the line used to draw the linear indicator.
    ///
    /// If [linearMinHeight] is null it defaults to 4dp.
    final double? linearMinHeight,

    /// Scheme color of the circular track being filled by circular indicator.
    ///
    /// If [circularTrackSchemeColor] is null the track will not be painted.
    final SchemeColor? circularTrackSchemeColor,

    /// Background scheme color fill under the circle of the refresh indicator.
    ///
    /// If [refreshBackgroundSchemeColor] is null then the ambient
    /// theme's [ThemeData.canvasColor]
    /// will be used. In FCs this defaults to [ColorScheme.surface].
    final SchemeColor? refreshBackgroundSchemeColor,

    /// The border radius of both the linear indicator and the track.
    ///
    /// Defaults to circular radius of 2 in Material-3, which produces a
    /// rounded shape with a rounded indicator. In Material-2 mode it defaults
    /// to [BorderRadius.zero], which produces a rectangular shape
    /// with a rectangular indicator.
    ///
    /// Providing a values of 0 or less will result in [BorderRadius.zero].
    final double? linearRadius,

    /// The scheme color of the stop indicator of the [LinearProgressIndicator].
    ///
    /// If [year2023] is true/null or [ThemeData.useMaterial3] is false, then
    /// no stop indicator will be drawn.
    ///
    /// Defaults to [SchemeColor.primary].
    final SchemeColor? stopIndicatorSchemeColor,

    /// Overrides the stop indicator radius of the [LinearProgressIndicator].
    ///
    /// If [year2023] is true or
    /// [ThemeData.useMaterial3] is false, then no stop indicator will be drawn.
    final double? stopIndicatorRadius,

    /// The width of the line used to draw the circle in  the
    /// [CircularProgressIndicator].
    final double? strokeWidth,

    /// The relative position of the stroke on a [CircularProgressIndicator].
    ///
    /// Values typically range from -1.0
    /// ([CircularProgressIndicator.strokeAlignInside], inside stroke)
    /// to 1.0 ([CircularProgressIndicator.strokeAlignOutside], outside stroke),
    /// without any bound constraints (e.g., a value of -2.0 is not typical,
    /// but allowed).
    /// A value of 0 ([CircularProgressIndicator.strokeAlignCenter]) will center
    /// the border on the edge of the widget.
    ///
    /// If [progressIndicatorYear2023] is true, then the default value is
    /// [CircularProgressIndicator.strokeAlignCenter].
    /// Otherwise, the default value is
    /// [CircularProgressIndicator.strokeAlignInside].
    final double? strokeAlign,

    /// Overrides the stroke cap of the [CircularProgressIndicator].
    ///
    /// Determines the shape of the stroke ends of the progress indicator.
    /// By default, [strokeCap] is null.
    /// When value is null (indeterminate), the stroke ends are set to
    /// [StrokeCap.square]. When value is not null, the stroke
    /// ends are set to [StrokeCap.butt].
    ///
    /// Setting [strokeCap] to [StrokeCap.round] will result in a rounded end.
    /// Setting [strokeCap] to [StrokeCap.butt] with value == null will result
    /// in a slightly different indeterminate animation; the indicator
    /// completely disappears and reappears on its minimum value.
    /// Setting [strokeCap] to [StrokeCap.square] with [value] != null will
    /// result in a different display of value. The indicator will start
    /// drawing from slightly less than the start, and end slightly after
    /// the end. This will produce an alternative result, as the
    /// default behavior, for example, that a value of 0.5 starts at 90
    /// degrees and ends at 270 degrees. With [StrokeCap.square], it could
    /// start 85 degrees and end at 275 degrees.
    final StrokeCap? strokeCap,

    /// Defines minimum and maximum sizes for a [CircularProgressIndicator].
    ///
    /// If null, in Material-2 or Material-3 when [year2023] is true or null,
    /// defaults to a minimum width and height of 36 pixels.
    /// If Material-3 mode and [year2023] is false,
    /// defaults to a minimum width and height of 40 pixels.
    final BoxConstraints? constraints,

    /// Overrides the active indicator and the background track gap.
    ///
    /// If [year2023] is true or
    /// [ThemeData.useMaterial3] is false, then no track gap will be drawn.
    final double? trackGap,

    /// Overrides the padding of the [CircularProgressIndicator].
    final EdgeInsetsGeometry? circularTrackPadding,

    /// When true, the [CircularProgressIndicator] and [LinearProgressIndicator]
    /// will use the 2023 Material-3 appearance. Defaults to true.
    ///
    /// If this is set to false, the [CircularProgressIndicator] and
    /// [LinearProgressIndicator] will use the latest Material-3 appearance,
    /// which was introduced in December 2023 and become common in 2024.
    ///
    /// If [ThemeData.useMaterial3] is false, then this property is ignored.
    final bool? year2023,
  }) =>
      _progressIndicatorTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        linearTrackSchemeColor: linearTrackSchemeColor,
        linearMinHeight: linearMinHeight,
        circularTrackSchemeColor: circularTrackSchemeColor,
        refreshBackgroundSchemeColor: refreshBackgroundSchemeColor,
        linearRadius: linearRadius,
        stopIndicatorSchemeColor: stopIndicatorSchemeColor,
        stopIndicatorRadius: stopIndicatorRadius,
        strokeWidth: strokeWidth,
        strokeAlign: strokeAlign,
        strokeCap: strokeCap,
        constraints: constraints,
        trackGap: trackGap,
        circularTrackPadding: circularTrackPadding,
        year2023: year2023,
      );

  /// An opinionated [RadioThemeData] theme.
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The splashRadius is not used by FlexColorScheme sub-themes.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the radio button.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used. This is more in-line
  /// with M3 design, but applied to M2 Radio. The M3 color design
  /// specification for the secondary color, is a poor choice for toggles and
  /// switches, primary color works better.
  ///
  /// * [splashRadius]
  /// The splash radius of the circular Material ink response.
  ///
  /// Defaults to kRadialReactionRadius = 20.
  ///
  /// * [unselectedIsColored]
  /// Defines if unselected [Radio] is also themed to be [baseSchemeColor].
  ///
  /// If false, it is grey like in Flutter SDK. Defaults to true.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static RadioThemeData radioTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the radio button.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used. This is more in-line
    /// with M3 design, but applied to M2 Radio. The M3 color design
    /// specification for the secondary color, is a poor choice for toggles and
    /// switches, primary color works better.
    final SchemeColor? baseSchemeColor,

    /// The splash radius of the circular Material ink response.
    ///
    /// Defaults to kRadialReactionRadius = 20.
    final double? splashRadius,

    /// Defines if unselected [Radio] is also themed to be [baseSchemeColor].
    ///
    /// If false, it is grey like in Flutter SDK. Defaults to true.
    ///
    /// If undefined, defaults to false.
    final bool? unselectedIsColored,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _radioTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        splashRadius: splashRadius,
        unselectedIsColored: unselectedIsColored,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [SearchBarThemeData] theme for the [SearchBar].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// The search bar's background fill color.
  ///
  /// If null, the default value is `surfaceContainerHigh`.
  ///
  /// * [elevation]
  /// The elevation of the search bar's [Material].
  ///
  /// If null, default value is 6.0.
  ///
  /// * [shadowColor]
  /// The shadow color of the search bar's [Material].
  ///
  /// If null, the default value is [ColorScheme.shadow].
  ///
  /// * [radius]
  /// The border radius of the search bar's underlying [Material].
  ///
  /// If not defined defaults to Stadium shape.
  ///
  /// * [padding]
  /// The padding between the search bar's boundary and its contents.
  ///
  /// If null, then the default value is 16.0 horizontally.
  ///
  /// * [textStyle]
  /// The style to use for the text being edited.
  ///
  /// If null, defaults to the `bodyLarge` text style from the current
  /// [Theme]. The default text color is [ColorScheme.onSurface].
  ///
  /// * [hintStyle]
  /// The style to use for the hintText.
  ///
  /// If null, defaults to [TextTheme.bodyLarge] text style from the current
  /// [Theme]. The default text color is [ColorScheme.onSurfaceVariant].
  ///
  /// * [constraints]
  /// Optional size constraints for the search bar.
  ///
  /// If null, the value of [SearchBarThemeData.constraints] will be used. If
  /// this is also null, then the constraints defaults to:
  ///
  /// ```dart
  /// const BoxConstraints(minWidth: 360.0, maxWidth: 800.0, minHeight: 56.0)
  /// ```
  ///
  /// * [textCapitalization]
  /// Configures how the platform keyboard will select an uppercase or
  /// lowercase keyboard.
  ///
  /// Only supports text keyboards, other keyboard types will ignore this
  /// configuration. Capitalization is locale-aware.
  ///
  /// If not defined, defaults to [TextCapitalization.none]
  ///
  /// * [tintedInteractions]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [tintedDisabled]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  static SearchBarThemeData searchBarTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// The search bar's background fill color.
    ///
    /// If null, the default value is `surfaceContainerHigh`.
    final SchemeColor? backgroundSchemeColor,

    /// The elevation of the search bar's [Material].
    ///
    /// If null, default value is 6.0.
    final double? elevation,

    /// The shadow color of the search bar's [Material].
    ///
    /// If null, the default value is [ColorScheme.shadow].
    final Color? shadowColor,

    /// The border radius of the search bar's underlying [Material].
    ///
    /// If not defined defaults to Stadium shape.
    final double? radius,

    // TODO(rydmike): Doing just a radius for now. Shapes later
    // The color and weight of the search bar's outline.
    //
    // This value is combined with [shape] to create a shape decorated
    // with an outline.
    //
    // If null, the search bar doesn't have a side by default.
    // final WidgetStateProperty<BorderSide?>? side,
    //
    // The shape of the search bar's underlying [Material].
    //
    // This shape is combined with [side] to create a shape decorated
    // with an outline.
    //
    // If null, defaults to [StadiumBorder].
    // final WidgetStateProperty<OutlinedBorder?>? shape,

    /// The padding between the search bar's boundary and its contents.
    ///
    /// If null, then the default value is 16.0 horizontally.
    final EdgeInsetsGeometry? padding,

    /// The style to use for the text being edited.
    ///
    /// If null, defaults to the `bodyLarge` text style from the current
    /// [Theme]. The default text color is [ColorScheme.onSurface].
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// The style to use for the [hintText].
    ///
    /// If null, defaults to `bodyLarge` text style from the current [Theme].
    /// The default text color is [ColorScheme.onSurfaceVariant].
    final WidgetStateProperty<TextStyle?>? hintStyle,

    /// Optional size constraints for the search bar.
    ///
    /// If null, the value of [SearchBarThemeData.constraints] will be used. If
    /// this is also null, then the constraints defaults to:
    ///
    /// ```dart
    /// const BoxConstraints(minWidth: 360.0, maxWidth: 800.0, minHeight: 56.0)
    /// ```
    final BoxConstraints? constraints,

    /// Configures how the platform keyboard will select an uppercase or
    /// lowercase keyboard.
    ///
    /// Only supports text keyboards, other keyboard types will ignore this
    /// configuration. Capitalization is locale-aware.
    ///
    /// If not defined, defaults to [TextCapitalization.none]
    TextCapitalization? textCapitalization,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? tintedInteractions,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? tintedDisabled,
  }) =>
      _searchBarTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        elevation: elevation,
        shadowColor: shadowColor,
        radius: radius,
        padding: padding,
        textStyle: textStyle,
        hintStyle: hintStyle,
        constraints: constraints,
        textCapitalization: textCapitalization,
        tintedInteractions: tintedInteractions,
        tintedDisabled: tintedDisabled,
      );

  /// An opinionated [SearchViewThemeData] theme for the [SearchBar]'s view.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// The search view's background fill color.
  ///
  /// If null, the default value is `surfaceContainerHigh`.
  ///
  /// * [elevation]
  /// The elevation of the search view's [Material].
  ///
  /// If null, the default value is 6.0.
  ///
  /// * [radius]
  /// The border radius of the search view's underlying [Material].
  ///
  /// If not defined defaults to 28.0.
  /// If in full screen defaults to 0.
  ///
  /// * [headerHeight]
  /// The height of the search field on the search view.
  ///
  /// If null, the default value is 56.0.
  ///
  /// * [headerTextStyle]
  /// The style to use for the text being edited on the search view.
  ///
  /// If null, defaults to the `bodyLarge` text style from the current
  /// [Theme]. The default text color is [ColorScheme.onSurface].
  ///
  /// * [headerHintStyle]
  /// The style to use for the `viewHintText` on the search view.
  ///
  /// If null, defaults to the [TextTheme.bodyLarge] text style from the current
  /// [Theme]. The default text color is [ColorScheme.onSurfaceVariant].
  ///
  /// * [dividerColor]
  /// The color of the divider on the search view.
  ///
  /// If this property is null, the default value is [ColorScheme.outline].
  ///
  /// * [constraints]
  /// Optional size constraints for the search view.
  ///
  /// By default, the search view has the same width as the anchor and is 2/3
  /// the height of the screen. If the width and height of the view are within
  /// the `viewConstraints`], the view will show its default size. Otherwise,
  /// the size of the view will be constrained by this property.
  ///
  /// If null, the constraints defaults to:
  ///
  /// ```dart
  /// const BoxConstraints(minWidth: 360.0, minHeight: 240.0)
  /// ```
  static SearchViewThemeData searchViewTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// The search view's background fill color.
    ///
    /// If null, the default value is `surfaceContainerHigh`.
    final SchemeColor? backgroundSchemeColor,

    /// The elevation of the search view's [Material].
    ///
    /// If null, the default value is 6.0.
    final double? elevation,

    // TODO(rydmike): Doing just a radius for now. Shapes later
    // The color and weight of the search view's outline.
    //
    // This value is combined with [shape] to create a shape decorated
    // with an outline. This will be ignored if the view is full-screen.
    //
    // If null, the search view doesn't have a side by default.
    // final BorderSide? side,
    //
    // The shape of the search view's underlying [Material].
    //
    // This shape is combined with [side] to create a shape decorated
    // with an outline.
    //
    // If null, then the default value is a rectangle shape for full-screen
    // mode and a [RoundedRectangleBorder] shape with a 28.0 radius otherwise.
    // final OutlinedBorder? shape,

    /// The border radius of the search view's underlying [Material].
    ///
    /// If not defined defaults to 28.0.
    /// If in full screen defaults to 0.
    final double? radius,

    /// The height of the search field on the search view.
    ///
    /// If null, the default value is 56.0.
    final double? headerHeight,

    /// The style to use for the text being edited on the search view.
    ///
    /// If null, defaults to the `bodyLarge` text style from the current
    /// [Theme]. The default text color is [ColorScheme.onSurface].
    final TextStyle? headerTextStyle,

    /// The style to use for the [viewHintText] on the search view.
    ///
    /// If null, defaults to the `bodyLarge` text style from the current
    /// [Theme]. The default text color is [ColorScheme.onSurfaceVariant].
    final TextStyle? headerHintStyle,

    /// The color of the divider on the search view.
    ///
    /// If this property is null, the default value is [ColorScheme.outline].
    final Color? dividerColor,

    /// Optional size constraints for the search view.
    ///
    /// By default, the search view has the same width as the anchor and is 2/3
    /// the height of the screen. If the width and height of the view are within
    /// the [viewConstraints], the view will show its default size. Otherwise,
    /// the size of the view will be constrained by this property.
    ///
    /// If null, the constraints defaults to:
    ///
    /// ```dart
    /// const BoxConstraints(minWidth: 360.0, minHeight: 240.0)
    /// ```
    final BoxConstraints? constraints,
  }) =>
      _searchViewTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        elevation: elevation,
        radius: radius,
        headerHeight: headerHeight,
        headerTextStyle: headerTextStyle,
        headerHintStyle: headerHintStyle,
        dividerColor: dividerColor,
        constraints: constraints,
      );

  /// An opinionated [SegmentedButtonThemeData] theme for the [SegmentedButton].
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [selectedSchemeColor]
  /// Selects which color from the passed in colorScheme to use as background
  /// color for the selected button.
  ///
  /// Defines the background color for selected button, and
  /// it's onColor pair defines the foreground for selected button.
  ///
  /// If not defined, secondaryContainer will be used.
  ///
  /// * [selectedForegroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// foreground color for the selected [SegmentedButton].
  ///
  /// If not defined, contrast color pair to [selectedSchemeColor]
  /// will be used.
  ///
  /// * [unselectedSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// background color for unselected segmented button.
  ///
  /// If not defined, transparent will be used.
  ///
  /// * [unselectedForegroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// foreground color for unselected segmented button.
  ///
  /// If not defined, contrast color pair to [unselectedSchemeColor]
  /// will be used, for transparent it is onSurface.
  ///
  /// * [borderSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the border
  /// color for the toggle buttons.
  ///
  /// If not defined, [ColorScheme.outline] will be the effective result.
  ///
  /// * [radius]
  /// The button corner radius.
  ///
  /// If not defined, defaults to defaults to Stadium border.
  ///
  /// * [borderWidth]
  /// The width of the borders around the segmented button.
  ///
  /// If null, defaults to [kThinBorderWidth] = 1.0.
  ///
  /// * [padding]
  /// Padding for the individual segment buttons.
  ///
  /// Defaults to null and uses M3's default scaled padding function.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
  /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
  /// [useMaterial3] is true, via M3 built in defaults.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashFactory]
  /// Creates the [InkWell] splash factory, which defines the appearance of
  /// "ink" splashes that occur in response to taps.
  ///
  /// In M2 mode FlexColorScheme passes in the effective splashFactory
  /// from splashFactory override value or the result from
  /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
  /// null and the default comes via ThemeData.splashFactory, that is has
  /// also defined.
  ///
  /// * [textStyle]
  /// The style for the segmented button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// [selectedSchemeColor] and [unselectedForegroundSchemeColor] are
  /// used instead.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static SegmentedButtonThemeData segmentedButtonTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as background
    /// color for the selected button.
    ///
    /// Defines the background color for selected button, and
    /// it's onColor pair defines the foreground for selected button.
    ///
    /// If not defined, secondaryContainer will be used.
    final SchemeColor? selectedSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// foreground color for the selected [SegmentedButton].
    ///
    /// If not defined, contrast color pair to [selectedSchemeColor]
    /// will be used.
    final SchemeColor? selectedForegroundSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// background color for unselected segmented button.
    ///
    /// If not defined, transparent will be used.
    final SchemeColor? unselectedSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// foreground color for unselected segmented button.
    ///
    /// If not defined, contrast color pair to [unselectedSchemeColor]
    /// will be used, for transparent it is onSurface.
    final SchemeColor? unselectedForegroundSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the border
    /// color for the toggle buttons.
    ///
    /// If not defined, [ColorScheme.outline] will be the effective result.
    final SchemeColor? borderSchemeColor,

    /// The button corner radius.
    ///
    /// If not defined, defaults to defaults to Stadium border.
    final double? radius,

    /// The width of the borders around the segmented button.
    ///
    /// If null, defaults to [kThinBorderWidth] = 1.0.
    final double? borderWidth,

    /// Padding for the individual segment buttons.
    ///
    /// Defaults to null and uses M3's default scaled padding function.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
    /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
    /// [useMaterial3] is true, via M3 built in defaults.
    final Size? minButtonSize,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Creates the [InkWell] splash factory, which defines the appearance of
    /// "ink" splashes that occur in response to taps.
    ///
    /// In M2 mode FlexColorScheme passes in the effective splashFactory
    /// from splashFactory override value or the result from
    /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
    /// null and the default comes via ThemeData.splashFactory, that is has
    /// also defined.
    final InteractiveInkFeatureFactory? splashFactory,

    /// The style for the segmented button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// [selectedSchemeColor] and [unselectedForegroundSchemeColor] are
    /// used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _segmentedButtonTheme(
        colorScheme: colorScheme,
        selectedSchemeColor: selectedSchemeColor,
        selectedForegroundSchemeColor: selectedForegroundSchemeColor,
        unselectedSchemeColor: unselectedSchemeColor,
        unselectedForegroundSchemeColor: unselectedForegroundSchemeColor,
        borderSchemeColor: borderSchemeColor,
        radius: radius,
        borderWidth: borderWidth,
        padding: padding,
        minButtonSize: minButtonSize,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        splashFactory: splashFactory,
        textStyle: textStyle,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [SliderThemeData] theme for the [Slider].
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the Slider.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [thumbSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the thumb
  /// color for the Slider.
  ///
  /// If not defined, [baseSchemeColor] will be used.
  ///
  /// * [trackHeight]
  /// The height of the [Slider] track.
  ///
  /// If not defined, defaults to 4 via Flutter SDK defaults.
  ///
  /// * [showValueIndicator]
  /// Whether the value indicator should be shown for different types of
  /// sliders.
  ///
  /// By default, [showValueIndicator] is set to
  /// [ShowValueIndicator.onlyForDiscrete]. The value indicator is only shown
  /// when the thumb is being touched.
  ///
  /// * [valueIndicatorType]
  /// Enum used to select the type of built-in value indicator used by
  /// [Slider].
  ///
  /// The current two options included Material 2 default
  /// [RectangularSliderValueIndicatorShape] and Material 3 default
  /// [DropSliderValueIndicatorShape].
  ///
  /// If not defined, the default for the M2/M3 mode is used.
  ///
  /// * [valueIndicatorColor]
  /// The color given to the [valueIndicatorType] to draw itself with.
  ///
  /// If undefined, defaults to using Flutter SDK's logic for the color.
  ///
  /// * [valueIndicatorTextStyle]
  /// The text style for the text on the value indicator.
  ///
  /// If undefined, defaults to using Flutter SDK's logic for the TextStyle.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useOldM3Design]
  /// Overrides the default value of `Slider.year2023`.
  ///
  /// When true, the [Slider] will use the 2023 Material Design 3 appearance.
  ///
  /// If this is set to false, the [Slider] will use the latest Material-3
  /// appearance, which was introduced in December 2023 and become common
  /// in 2024.
  ///
  /// In Flutter Material SDK, this property is named `year2023`.
  ///
  /// If undefined, defaults to true, via Flutter Material's default behavior.
  /// If [useMaterial3] is false, then this property is ignored.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static SliderThemeData sliderTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the Slider.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? baseSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the thumb
    /// color for the Slider.
    ///
    /// If not defined, [baseSchemeColor] will be used.
    final SchemeColor? thumbSchemeColor,

    /// The height of the [Slider] track.
    ///
    /// If not defined, defaults to 4 via Flutter SDK defaults.
    final double? trackHeight,

    /// Whether the value indicator should be shown for different types of
    /// sliders.
    ///
    /// By default, [showValueIndicator] is set to
    /// [ShowValueIndicator.onlyForDiscrete]. The value indicator is only shown
    /// when the thumb is being touched.
    final ShowValueIndicator? showValueIndicator,

    /// Enum used to select the type of built-in value indicator used by
    /// [Slider].
    ///
    /// The current two options included Material 2 default
    /// [RectangularSliderValueIndicatorShape] and Material 3 default
    /// [DropSliderValueIndicatorShape].
    ///
    /// If not defined, the default for the M2/M3 mode is used.
    final FlexSliderIndicatorType? valueIndicatorType,

    /// The color given to the [valueIndicatorShape] to draw itself with.
    ///
    /// If undefined, defaults to using Flutter SDK's logic for the color.
    final Color? valueIndicatorColor,

    /// The text style for the text on the value indicator.
    ///
    /// If undefined, defaults to using Flutter SDK's logic for the TextStyle.
    final TextStyle? valueIndicatorTextStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Overrides the default value of [Slider.year2023].
    ///
    /// When true, the [Slider] will use the 2023 Material Design 3 appearance.
    ///
    /// If this is set to false, the [Slider] will use the latest Material-3
    /// appearance, which was introduced in December 2023 and become common
    /// in 2024.
    ///
    /// In Flutter Material SDK, this property is named `year2023`.
    ///
    /// If undefined, defaults to true, via Flutter Material's default behavior.
    /// If [useMaterial3] is false, then this property is ignored.
    final bool? useOldM3Design,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _sliderTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        thumbSchemeColor: thumbSchemeColor,
        trackHeight: trackHeight,
        showValueIndicator: showValueIndicator,
        valueIndicatorType: valueIndicatorType,
        valueIndicatorColor: valueIndicatorColor,
        valueIndicatorTextStyle: valueIndicatorTextStyle,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        useOldM3Design: useOldM3Design,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [SnackBarThemeData] with custom elevation.
  ///
  /// The [elevation] defaults to [kSnackBarElevation] (4).
  ///
  /// The named parameters are:
  ///
  /// * [elevation]
  /// SnackBar elevation
  ///
  /// If undefined defaults to [kSnackBarElevation] = 4.
  ///
  /// * [radius]
  /// Corner radius of the [SnackBar].
  ///
  /// If not defined, defaults to 4 dp, but only when
  /// [SnackBar.behavior] style [SnackBarBehavior.floating] is used. This
  /// default is based on SDK widget default behavior and is  based on
  /// M3 Specification https://m3.material.io/components/snackbar/specs.
  ///
  /// NOTE: If this theme property is set, both SnackBars with behavior
  /// fixed and floating will get the assigned radius. See issue:
  /// https://github.com/flutter/flutter/issues/108539
  ///
  /// * [backgroundColor]
  /// The background color of the themed SnackBar. Typically one of inverse
  /// brightness compared to theme's surface color brightness.
  ///
  /// If null then it default to Flutter SDK theme defaults below.
  /// When FlexColorScheme sub themes are used and [backgroundSchemeColor]
  /// has not been defined, it defaults to FCS default shown below:
  ///
  /// * Default in light theme mode:
  ///   * Via FCS: onSurface with primary blend at 45% opacity, with
  ///     total opacity 95%
  ///   * Flutter SDK M2 uses: colorScheme.onSurface with opacity 80%,
  ///     alpha blended on top of colorScheme.surface.
  ///   * Flutter SDK M3 uses: colorScheme.inverseSurface.
  ///
  /// * In dark theme mode:
  ///   * FCS: onSurface with primary blend at 39% opacity, with total
  ///     opacity 93%
  ///   * Flutter SDK M2 uses: colorScheme.onSurface
  ///   * Flutter SDK M2 uses: colorScheme.inverseSurface
  ///
  ///  If a [colorScheme] is passed in and [backgroundSchemeColor] is defined,
  ///  it will override [backgroundColor] and be used instead.
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in [colorScheme] to use as
  /// [SnackBar] background color.
  ///
  /// If not defined or [colorScheme] is not defined, then the passed in
  /// [backgroundColor] will be used, which may be null too and SnackBar then
  /// falls back Flutter SDK defaults, or to FCS default if this is used by
  /// FCS that passes in its one custom default.
  ///
  /// * [actionTextSchemeColor]
  /// Overrides the default value for [SnackBarAction.textColor].
  ///
  /// If null, [SnackBarAction] and [colorScheme] is defined, defaults to
  /// [ColorScheme.inversePrimary], if a [colorScheme] was not defined, then
  /// defaults to effective foreground color with alpha 0xDD.
  ///
  /// * [contentTextStyle]
  /// Used to configure the [DefaultTextStyle] for the [SnackBar.content]
  /// widget.
  ///
  /// If null, [SnackBar] defines its default using titleMedium
  static SnackBarThemeData snackBarTheme({
    /// SnackBar elevation
    ///
    /// If undefined defaults to [kSnackBarElevation] = 4.
    final double? elevation,

    /// Corner radius of the [SnackBar].
    ///
    /// If not defined, defaults to 4 dp, but only when
    /// [SnackBar.behavior] style [SnackBarBehavior.floating] is used. This
    /// default is based on SDK widget default behavior and is  based on
    /// M3 Specification https://m3.material.io/components/snackbar/specs.
    ///
    /// NOTE: If this theme property is set, both SnackBars with behavior
    /// fixed and floating will get the assigned radius. See issue:
    /// https://github.com/flutter/flutter/issues/108539
    final double? radius,

    /// The background color of the themed SnackBar. Typically one of inverse
    /// brightness compared to theme's surface color brightness.
    ///
    /// If null then it default to Flutter SDK theme defaults below.
    /// When FlexColorScheme sub themes are used and [backgroundSchemeColor]
    /// has not been defined, it defaults to FCS default shown below:
    ///
    /// * Default in light theme mode:
    ///   * Via FCS: onSurface with primary blend at 45% opacity, with
    ///     total opacity 95%
    ///   * Flutter SDK M2 uses: colorScheme.onSurface with opacity 80%,
    ///     alpha blended on top of colorScheme.surface.
    ///   * Flutter SDK M3 uses: colorScheme.inverseSurface.
    ///
    /// * In dark theme mode:
    ///   * FCS: onSurface with primary blend at 39% opacity, with total
    ///     opacity 93%
    ///   * Flutter SDK M2 uses: colorScheme.onSurface
    ///   * Flutter SDK M2 uses: colorScheme.inverseSurface
    ///
    ///  If a [colorScheme] is passed in and [backgroundSchemeColor] is defined,
    ///  it will override [backgroundColor] and be used instead.
    final Color? backgroundColor,

    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    final ColorScheme? colorScheme,

    /// Selects which color from the passed in [colorScheme] to use as
    /// [SnackBar] background color.
    ///
    /// If not defined or [colorScheme] is not defined, then the passed in
    /// [backgroundColor] will be used, which may be null too and SnackBar then
    /// falls back Flutter SDK defaults, or to FCS default if this is used by
    /// FCS that passes in its one custom default.
    final SchemeColor? backgroundSchemeColor,

    /// Overrides the default value for [SnackBarAction.textColor].
    ///
    /// If null, [SnackBarAction] and [colorScheme] is defined, defaults to
    /// [ColorScheme.inversePrimary], if a [colorScheme] was not defined, then
    /// defaults to effective foreground color with alpha 0xDD.
    final SchemeColor? actionTextSchemeColor,

    /// Used to configure the [DefaultTextStyle] for the [SnackBar.content]
    /// widget.
    ///
    /// If null, [SnackBar] defines its default using titleMedium
    final TextStyle? contentTextStyle,
  }) =>
      _snackBarTheme(
        elevation: elevation,
        radius: radius,
        backgroundColor: backgroundColor,
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        actionTextSchemeColor: actionTextSchemeColor,
        contentTextStyle: contentTextStyle,
      );

  /// An opinionated [SwitchThemeData] theme.
  ///
  /// Requires a [ColorScheme] in [colorScheme]. The color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The splashRadius is not used by FlexColorScheme sub-themes.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the switch.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used. This is more in-line
  /// with M3 design, but applied to M2 switch. The M3 color design
  /// specification for the secondary color, is a poor choice for toggles and
  /// switches, if such colors are used in M2 mode, primary color works
  /// better.
  ///
  /// * [thumbSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the thumb
  /// color for the switch.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used in M2 mode.
  /// This is more in-line
  /// with M3 design, but applied to M2 switch. The M3 color design
  /// specification for the secondary color, is a poor choice for toggles and
  /// switches, if such colors are used in M2 mode, primary color works
  /// better.
  ///
  /// If not defined, defaults to:
  ///
  /// - If useMaterial3 is false [baseSchemeColor].
  /// - If useMaterial3 is true [SchemeColor.primaryContainer].
  ///
  /// * [thumbFixedSize]
  /// Set to true to keep the [Switch] thumb size fixed.
  ///
  /// When true the [Switch] thumb size does not change from small size when
  /// OFF, to a larger size when ON. This makes the Material-3 Switch even
  /// more similar to the iOS style Switch.
  ///
  /// This setting only applies to the Material-3 mode, it has no effect in
  /// Material-2 mode.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashRadius]
  /// The splash radius of the circular Material ink response.
  ///
  /// If null, default via SDK defaults to [kRadialReactionRadius] = 20.
  ///
  /// * [unselectedIsColored]
  /// Defines if unselected [Switch] is also themed to be [baseSchemeColor].
  ///
  /// If false, it is grey like in Flutter SDK.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useCupertinoStyle]
  /// Defines if the theme uses Cupertino style switch.
  ///
  /// This option only works when [useMaterial3] is true. If it is false
  /// the setting has no impact.
  ///
  /// When used the Switch will be styled like a CupertinoSwitch, but with
  /// the colors defined by [baseSchemeColor]. The themed Switch is not
  /// an exact match for the CupertinoSwitch, but as close as you can
  /// get with the Material Switch theming features.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static SwitchThemeData switchTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the switch.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used. This is more in-line
    /// with M3 design, but applied to M2 switch. The M3 color design
    /// specification for the secondary color, is a poor choice for toggles and
    /// switches, if such colors are used in M2 mode, primary color works
    /// better.
    final SchemeColor? baseSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the thumb
    /// color for the switch.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used in M2 mode.
    /// This is more in-line
    /// with M3 design, but applied to M2 switch. The M3 color design
    /// specification for the secondary color, is a poor choice for toggles and
    /// switches, if such colors are used in M2 mode, primary color works
    /// better.
    ///
    /// If not defined, defaults to:
    ///
    /// - If useMaterial3 is false [baseSchemeColor].
    /// - If useMaterial3 is true [SchemeColor.primaryContainer].
    final SchemeColor? thumbSchemeColor,

    /// Set to true to keep the [Switch] thumb size fixed.
    ///
    /// When true the [Switch] thumb size does not change from small size when
    /// OFF, to a larger size when ON. This makes the Material-3 Switch even
    /// more similar to the iOS style Switch.
    ///
    /// This setting only applies to the Material-3 mode, it has no effect in
    /// Material-2 mode.
    ///
    /// If undefined, defaults to false.
    final bool? thumbFixedSize,

    /// The splash radius of the circular Material ink response.
    ///
    /// If null, default via SDK defaults to [kRadialReactionRadius] = 20.
    final double? splashRadius,

    /// Defines if unselected [Switch] is also themed to be [baseSchemeColor].
    ///
    /// If false, it is grey like in Flutter SDK.
    ///
    /// If undefined, defaults to false.
    final bool? unselectedIsColored,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Defines if the theme uses Cupertino style switch.
    ///
    /// This option only works when [useMaterial3] is true. If it is false
    /// the setting has no impact.
    ///
    /// When used the Switch will be styled like a CupertinoSwitch, but with
    /// the colors defined by [baseSchemeColor]. The themed Switch is not
    /// an exact match for the CupertinoSwitch, but as close as you can
    /// get with the Material Switch theming features.
    ///
    /// If undefined, defaults to false.
    final bool? useCupertinoStyle,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _switchTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        thumbSchemeColor: thumbSchemeColor,
        thumbFixedSize: thumbFixedSize,
        splashRadius: splashRadius,
        unselectedIsColored: unselectedIsColored,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        useCupertinoStyle: useCupertinoStyle,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [TabBarThemeData] theme.
  ///
  /// Contrary to the other opinionated static [FlexSubThemes] sub-theme
  /// function, this one is only a sub-set of the original and does not do or
  /// contain any feature shortcuts.
  ///
  /// The [FlexColorScheme.toTheme] needs some of the properties, like fore-
  /// and background colors used here, for other component theme definitions as
  /// well and has already computed them once, so they are reused here.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also used for your [ThemeData].
  ///
  /// * [labelStyle]
  /// Overrides the default value for [TabBar.labelStyle].
  ///
  /// * [labelColor]
  /// Overrides the default value for [TabBar.labelColor].
  ///
  /// * [unselectedLabelColor]
  /// Overrides the default value for [TabBar.unselectedLabelColor].
  ///
  /// * [indicatorSize]
  /// Overrides the default value for [TabBar.indicatorSize].
  ///
  /// * [indicatorWeight]
  /// The thickness of the underline border indicator on the [TabBar].
  ///
  /// If not defined, defaults to 2 in M2 and to 3 in M3.
  ///
  /// * [tabAlignment]
  /// Overrides the default value for [TabBar.tabAlignment].
  ///
  /// In M3 the default is [TabAlignment.startOffset] if [TabBar.isScrollable]
  /// property is true, if false the default is [TabAlignment.fill].
  ///
  /// In M2 the default is [TabAlignment.start] if [TabBar.isScrollable]
  /// property is true, if false the default is [TabAlignment.fill].
  ///
  /// **NOTE:**
  ///
  /// [TabAlignment.start] and [TabAlignment.startOffset] are only usable
  /// when widget sets [TabBar.isScrollable] to true. If used when
  /// [TabBar.isScrollable] is false, the [TabBar] will throw an exception
  /// error.
  ///
  /// Likewise [TabAlignment.fill] is only usable when widgets sets
  /// [TabBar.isScrollable] to false. If used when [TabBar.isScrollable] is
  /// true, the [TabBar] will throw an exception error.
  ///
  /// Only universal theming option usable in a theme, other than widget
  /// default behavior is [TabAlignment.center]. This is not a good
  /// design setup. We need to be able to specify the themed alignment
  /// for both scrollable and non-scrollable [TabBar]s so we can style them
  /// with different alignments. That do not throw for the used [TabBar]
  /// variant.
  ///
  /// * [indicatorAnimation]
  /// Specifies the animation behavior of the tab indicator in a [TabBar].
  ///
  /// If not defined, the tab indicator will animate linearly if
  /// the [indicatorSize] is [TabBarIndicatorSize.tab], otherwise it will
  /// animate with an elastic effect if the [indicatorSize] is
  /// [TabBarIndicatorSize.label].
  ///
  /// * [indicatorTopRadius]
  /// The top left and right corner radius of the underline border
  /// indicator on the [TabBar].
  ///
  /// If not defined, defaults to 0 in M2 and to 3 in M3.
  ///
  /// * [indicatorColor]
  /// Overrides the default value for [TabBar.indicatorColor].
  ///
  /// * [unselectedLabelStyle]
  /// Overrides the default value for [TabBar.unselectedLabelStyle].
  ///
  /// * [dividerColor]
  /// The color of the divider.
  ///
  /// If null and [useMaterial3] is true, [TabBarThemeData.dividerColor]
  /// color is used. If that is null and [useMaterial3] is true,
  /// [ColorScheme.outlineVariant] will be used,
  /// otherwise divider will not be drawn.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static TabBarThemeData tabBarTheme({
    /// Typically the same [ColorScheme] that is also used for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Overrides the default value for [TabBar.labelStyle].
    final TextStyle? labelStyle,

    /// Overrides the default value for [TabBar.labelColor].
    final Color? labelColor,

    /// Overrides the default value for [TabBar.unselectedLabelColor].
    final Color? unselectedLabelColor,

    /// Overrides the default value for [TabBar.indicatorSize].
    final TabBarIndicatorSize? indicatorSize,

    /// The thickness of the underline border indicator on the [TabBar].
    ///
    /// If not defined, defaults to 2 in M2 and to 3 in M3.
    final double? indicatorWeight,

    // TODO(rydmike): Open issue about using TabAlignment. Theme variant issue.
    /// Overrides the default value for [TabBar.tabAlignment].
    ///
    /// In M3 the default is [TabAlignment.startOffset] if [TabBar] property
    /// [isScrollable] is true, if false the default is [TabAlignment.fill].
    ///
    /// In M2 the default is [TabAlignment.start] if [TabBar] property
    /// [isScrollable] is true, if false the default is [TabAlignment.fill].
    ///
    /// **NOTE:**
    ///
    /// [TabAlignment.start] and [TabAlignment.startOffset] are only usable
    /// when widget sets [TabBar.isScrollable] to true. If used when
    /// [TabBar.isScrollable] is false, the [TabBar] will throw an exception
    /// error.
    ///
    /// Likewise [TabAlignment.fill] is only usable when widgets sets
    /// [TabBar.isScrollable] to false. If used when [TabBar.isScrollable] is
    /// true, the [TabBar] will throw an exception error.
    ///
    /// Only universal theming option usable in a theme, other than widget
    /// default behavior is [TabAlignment.center]. This is not a good
    /// design setup. We need to be able to specify the themed alignment
    /// for both scrollable and non-scrollable [TabBar]s so we can style them
    /// with different alignments. That do not throw for the used [TabBar]
    /// variant.
    final TabAlignment? tabAlignment,

    /// Specifies the animation behavior of the tab indicator in a [TabBar].
    ///
    /// If not defined, the tab indicator will animate linearly if
    /// the [indicatorSize] is [TabBarIndicatorSize.tab], otherwise it will
    /// animate with an elastic effect if the [indicatorSize] is
    /// [TabBarIndicatorSize.label].
    final TabIndicatorAnimation? indicatorAnimation,

    /// The top left and right corner radius of the underline border
    /// indicator on the [TabBar].
    ///
    /// If not defined, defaults to 0 in M2 and to 3 in M3.
    final double? indicatorTopRadius,

    /// Overrides the default value for [TabBar.indicatorColor].
    final Color? indicatorColor,

    /// Overrides the default value for [TabBar.unselectedLabelStyle].
    final TextStyle? unselectedLabelStyle,

    /// The color of the divider.
    ///
    /// If null and [useMaterial3] is true, [TabBarThemeData.dividerColor]
    /// color is used. If that is null and [useMaterial3] is true,
    /// [ColorScheme.outlineVariant] will be used,
    /// otherwise divider will not be drawn.
    final Color? dividerColor,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _tabBarTheme(
        colorScheme: colorScheme,
        labelStyle: labelStyle,
        labelColor: labelColor,
        unselectedLabelColor: unselectedLabelColor,
        indicatorSize: indicatorSize,
        indicatorWeight: indicatorWeight,
        tabAlignment: tabAlignment,
        indicatorAnimation: indicatorAnimation,
        indicatorTopRadius: indicatorTopRadius,
        indicatorColor: indicatorColor,
        unselectedLabelStyle: unselectedLabelStyle,
        dividerColor: dividerColor,
        useTintedInteraction: useTintedInteraction,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [TextButtonThemeData] theme.
  ///
  /// Requires a [ColorScheme], the color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The adjustable button corner [radius] defaults to 20. This is the new
  /// default in M3, Flutter SDK M2 defaults to 4.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// color for the button.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, [ColorScheme.primary] will be used.
  ///
  /// * [radius]
  /// The button corner radius.
  ///
  /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
  /// M3 it defaults to Stadium border based on
  /// https://m3.material.io/components/buttons/specs
  ///
  /// * [padding]
  /// Padding for the button theme.
  ///
  /// Defaults to null and uses M3's default scaled padding function.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
  /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
  /// [useMaterial3] is true via widget defaults.
  ///
  /// * [textStyle]
  /// The style for the button's [Text] widget descendants.
  ///
  /// The color of the [textStyle] is typically not used directly, the
  /// foreground color is used instead.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [splashFactory]
  /// Creates the [InkWell] splash factory, which defines the appearance of
  /// "ink" splashes that occur in response to taps.
  ///
  /// In M2 mode FlexColorScheme passes in the effective splashFactory
  /// from splashFactory override value or the result from
  /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
  /// null and the default comes via ThemeData.splashFactory, that is has
  /// also defined.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static TextButtonThemeData textButtonTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// color for the button.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, [ColorScheme.primary] will be used.
    final SchemeColor? baseSchemeColor,

    /// The button corner radius.
    ///
    /// If not defined, defaults to [kButtonRadius] 40dp in M2. When using
    /// M3 it defaults to Stadium border based on
    /// https://m3.material.io/components/buttons/specs
    final double? radius,

    /// Padding for the button theme.
    ///
    /// Defaults to null and uses M3's default scaled padding function.
    final EdgeInsetsGeometry? padding,

    /// Minimum button size.
    ///
    /// If null, defaults to [kButtonMinSize] (`const Size(40.0, 40.0)`) when
    /// [useMaterial3] is false and to `const Size(64.0, 40.0)` when
    /// [useMaterial3] is true via widget defaults.
    final Size? minButtonSize,

    /// The style for the button's [Text] widget descendants.
    ///
    /// The color of the [textStyle] is typically not used directly, the
    /// [foregroundColor] is used instead.
    final WidgetStateProperty<TextStyle?>? textStyle,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// Creates the [InkWell] splash factory, which defines the appearance of
    /// "ink" splashes that occur in response to taps.
    ///
    /// In M2 mode FlexColorScheme passes in the effective splashFactory
    /// from splashFactory override value or the result from
    /// [FlexSubThemesData] adaptive splash settings. In M3 mode it is kept
    /// null and the default comes via ThemeData.splashFactory, that is has
    /// also defined.
    final InteractiveInkFeatureFactory? splashFactory,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _textButtonTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        radius: radius,
        padding: padding,
        minButtonSize: minButtonSize,
        textStyle: textStyle,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        splashFactory: splashFactory,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [TextSelectionThemeData] theme.
  ///
  /// Requires a [ColorScheme], the color scheme would
  /// typically be equal the color scheme also used to define the color scheme
  /// for your app theme.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [cursorSchemeColor]
  /// The [SchemeColor] based color of the cursor in the text field.
  ///
  /// The cursor indicates the current location of text insertion point in
  /// the field.
  ///
  /// If not defined, [ColorScheme.primary] is used.
  ///
  /// * [selectionSchemeColor]
  /// The [SchemeColor] based background color of selected text.
  ///
  /// If not defined, [ColorScheme.primary] is used.
  ///
  /// * [selectionOpacity]
  /// The opacity applied to [selectionSchemeColor].
  ///
  /// If not defined, default to [kTextSelectionOpacity] = 0.4 (40%).
  /// Same as Flutter SDK default.
  ///
  /// * [selectionHandleSchemeColor]
  /// The [SchemeColor] based color of the selection handles on the
  /// text field.
  ///
  /// Selection handles are used to indicate the bounds of the selected text,
  /// or as a handle to drag the cursor to a new location in the text.
  ///
  /// If not defined, [ColorScheme.primary] is used.
  ///
  /// * [selectionHandleCustomColor]
  /// A custom override color that
  /// [TextSelectionThemeData.selectionHandleColor] will use if it is defined.
  ///
  /// If not defined, the result from [selectionHandleSchemeColor] is used.
  static TextSelectionThemeData textSelectionTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// The [SchemeColor] based color of the cursor in the text field.
    ///
    /// The cursor indicates the current location of text insertion point in
    /// the field.
    ///
    /// If not defined, [ColorScheme.primary] is used.
    final SchemeColor? cursorSchemeColor,

    /// The [SchemeColor] based background color of selected text.
    ///
    /// If not defined, [ColorScheme.primary] is used.
    final SchemeColor? selectionSchemeColor,

    /// The opacity applied to [selectionSchemeColor].
    ///
    /// If not defined, default to [kTextSelectionOpacity] = 0.4 (40%).
    /// Same as Flutter SDK default.
    final double? selectionOpacity,

    /// The [SchemeColor] based color of the selection handles on the
    /// text field.
    ///
    /// Selection handles are used to indicate the bounds of the selected text,
    /// or as a handle to drag the cursor to a new location in the text.
    ///
    /// If not defined, [ColorScheme.primary] is used.
    final SchemeColor? selectionHandleSchemeColor,

    /// A custom override color that
    /// [TextSelectionThemeData.selectionHandleColor] will use if it is defined.
    ///
    /// If not defined, the result from [selectionHandleSchemeColor] is used.
    final Color? selectionHandleCustomColor,
  }) =>
      _textSelectionTheme(
        colorScheme: colorScheme,
        cursorSchemeColor: cursorSchemeColor,
        selectionSchemeColor: selectionSchemeColor,
        selectionOpacity: selectionOpacity,
        selectionHandleSchemeColor: selectionHandleSchemeColor,
        selectionHandleCustomColor: selectionHandleCustomColor,
      );

  /// An opinionated [TimePickerThemeData] with custom corner radius.
  ///
  /// Corner [radius] defaults to [kDialogRadius] 28dp. The internal shapes
  /// in the picker also have rounding, their corner radii are defined by
  /// [elementRadius] that defaults to [kCardRadius] 12.
  ///
  /// In the InputDecorator, if you pass it an input decoration style
  /// that matches the main input decoration style and corner rounding it
  /// will be used on the data entry elements in the picker.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
  ///
  /// * [backgroundSchemeColor]
  /// Dialog background color.
  ///
  /// If null and [backgroundSchemeColor] is also null, then it
  /// gets default via Dialog's default null theme behavior.
  ///
  /// If [backgroundSchemeColor] is defined, it will override any color
  /// passed in here.
  ///
  /// Can be used to make a custom themed dialog with own background color,
  /// even after the `ThemeData.dialogBackgroundColor`] property is
  /// is deprecated in Flutter SDK. See
  /// https://github.com/flutter/flutter/issues/91772)
  ///
  /// * [backgroundColor]
  /// Dialog background color.
  ///
  /// If null and [backgroundSchemeColor] is also null, then it
  /// gets default via Dialog's default null theme behavior.
  ///
  /// If [backgroundSchemeColor] is defined, it will override any color
  /// passed in here.
  ///
  /// Can be used to make a custom themed dialog with own background color,
  /// even after the `ThemeData.dialogBackgroundColor` property is
  /// is deprecated in Flutter SDK. See
  /// https://github.com/flutter/flutter/issues/91772)
  ///
  /// * [elevation]
  /// Dialog elevation.
  ///
  /// If not defined, defaults to [kDialogElevation] = 6.
  ///
  /// * [radius]
  /// Corner radius of the [TimePickerDialog] dialog.
  ///
  /// If not defined, defaults to [kDialogRadius] = 28.
  ///
  /// * [elementRadius]
  /// Corner radius of the [TimePickerDialog] internal elements.
  ///
  /// If not defined, defaults to [kTimeElementRadius] = 12.
  ///
  /// * [dayPeriodTextStyle]
  /// The text style of the day period text.
  ///
  /// * [dialTextStyle]
  /// The text style of the dial text.
  ///
  /// * [helpTextStyle]
  /// The text style of the help text.
  ///
  /// * [hourMinuteTextStyle]
  /// The text style of the hour/minute text.
  ///
  /// * [inputDecorationTheme]
  /// A custom input decoration theme for the time picker's input fields.
  ///
  /// * [useInputDecoratorTheme]
  /// Use the [inputDecorationTheme] if defined.
  ///
  /// If this is false, the input decoration theme is not used, even if
  /// defined. If true, it is used if defined.
  ///
  /// Defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static TimePickerThemeData timePickerTheme({
    /// Typically the same `ColorScheme` that is also used for your `ThemeData`.
    required final ColorScheme colorScheme,

    /// Dialog background color.
    ///
    /// If null and [backgroundSchemeColor] is also null, then it
    /// gets default via Dialog's default null theme behavior.
    ///
    /// If [backgroundSchemeColor] is defined, it will override any color
    /// passed in here.
    ///
    /// Can be used to make a custom themed dialog with own background color,
    /// even after the [ThemeData.dialogBackgroundColor] property is
    /// is deprecated in Flutter SDK. See
    /// https://github.com/flutter/flutter/issues/91772)
    final SchemeColor? backgroundSchemeColor,

    /// Dialog background color.
    ///
    /// If null and [backgroundSchemeColor] is also null, then it
    /// gets default via Dialog's default null theme behavior.
    ///
    /// If [backgroundSchemeColor] is defined, it will override any color
    /// passed in here.
    ///
    /// Can be used to make a custom themed dialog with own background color,
    /// even after the [ThemeData.dialogBackgroundColor] property is
    /// is deprecated in Flutter SDK. See
    /// https://github.com/flutter/flutter/issues/91772)
    final Color? backgroundColor,

    /// Dialog elevation.
    ///
    /// If not defined, defaults to [kDialogElevation] = 6.
    final double? elevation,

    /// Corner radius of the [TimePickerDialog] dialog.
    ///
    /// If not defined, defaults to [kDialogRadius] = 28.
    final double? radius,

    /// Corner radius of the [TimePickerDialog] internal elements.
    ///
    /// If not defined, defaults to [kTimeElementRadius] = 12.
    final double? elementRadius,

    /// The text style of the day period text.
    final TextStyle? dayPeriodTextStyle,

    /// The text style of the dial text.
    final TextStyle? dialTextStyle,

    /// The text style of the help text.
    final TextStyle? helpTextStyle,

    /// The text style of the hour/minute text.
    final TextStyle? hourMinuteTextStyle,

    /// A custom input decoration theme for the time picker's input fields.
    final InputDecorationThemeData? inputDecorationTheme,

    /// Use the [inputDecorationTheme] if defined.
    ///
    /// If this is false, the input decoration theme is not used, even if
    /// defined. If true, it is used if defined.
    ///
    /// Defaults to false.
    final bool? useInputDecoratorTheme,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _timePickerTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        backgroundColor: backgroundColor,
        elevation: elevation,
        radius: radius,
        elementRadius: elementRadius,
        dayPeriodTextStyle: dayPeriodTextStyle,
        dialTextStyle: dialTextStyle,
        helpTextStyle: helpTextStyle,
        hourMinuteTextStyle: hourMinuteTextStyle,
        inputDecorationTheme: inputDecorationTheme,
        useInputDecoratorTheme: useInputDecoratorTheme,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [ToggleButtonsThemeData] theme.
  ///
  /// The adjustable button corner [radius] defaults to 20 this is new
  /// default in M3, Flutter SDK M2 defaults to 4.
  ///
  /// Button border width can be adjusted and defaults to same width
  /// as outline thickness on selected outline button and input decorator.
  ///
  /// Unfortunately [ToggleButtons] cannot be themed to have different border
  /// width in disabled mode than enabled mode, like [OutlinedButton] can.
  /// If it is important that the themed border appears similar to the disabled
  /// border width, then keep the thin and thick outlined borders same or
  /// reasonably close to each other.
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [baseSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the main
  /// base color for the [ToggleButtons].
  ///
  /// Always defines the background color for selected button, and
  /// it's onColor pair defines the foreground for selected button.
  ///
  /// If [unselectedSchemeColor] is not defined, [baseSchemeColor] is also
  /// used as foreground color for unselected buttons.
  ///
  /// If [borderSchemeColor] is not defined, then in M2 it is also used as
  /// color base for the border color, in M3 and undefined borderSchemeColor
  /// results in [ColorScheme.outline] color being used.
  ///
  /// If not defined, primary will be used.
  ///
  /// * [selectedForegroundSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// foreground color for the selected [ToggleButtons].
  ///
  /// If not defined, contrast color pair to [baseSchemeColor] will be used,
  /// which for its default value is onPrimary.
  ///
  /// * [unselectedSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the
  /// foreground color for unselected [ToggleButtons].
  ///
  /// If not defined, [baseSchemeColor] will be used as base.
  ///
  /// * [borderSchemeColor]
  /// Selects which color from the passed in colorScheme to use as the border
  /// color for the toggle buttons.
  ///
  /// If not defined, [baseSchemeColor] will be used as base in M2, in M3
  /// [ColorScheme.outline] will be the effective result.
  ///
  /// * [radius]
  /// The button corner radius.
  ///
  /// If not defined, defaults to [kButtonRadius] 40dp.
  ///
  /// This is not in M3 specification, but FlexColorScheme component
  /// sub-themes harmonizes [ToggleButtons] size
  /// and border radius with the other Material buttons.
  ///
  /// * [borderWidth]
  /// The width of the borders around the toggle buttons.
  ///
  /// In this design it uses the same default as outline thickness for
  /// selected outline button and input decorator.
  ///
  /// If null, defaults to [kThinBorderWidth] = 1.0, when
  /// [useMaterial3] is false, and to 1 when [useMaterial3] is true.
  ///
  /// * [minButtonSize]
  /// Minimum button size.
  ///
  /// If undefined, defaults to [kButtonMinSize] = Size(40, 40).
  ///
  /// * [textStyle]
  /// The default text style for [ToggleButtons.children].
  ///
  /// [TextStyle.color] will be ignored and substituted by the `color`,
  /// `selectedColor` or `disabledColor` depending on whether the buttons
  /// are active, selected, or disabled.
  ///
  /// * [visualDensity]
  /// VisualDensity for ToggleButtons.
  ///
  /// The ToggleButtons do not implement VisualDensity from theme, but we can
  /// pass in what we use in ThemeData and adjust its size accordingly.
  ///
  /// You should pass in the same visual density that you set on your
  /// Theme to the ToggleButtons to make them keep the same size as the
  /// main buttons.
  ///
  /// Defaults to null, that results in VisualDensity.adaptivePlatformDensity
  /// being used, which is same as null default in ThemeData.
  ///
  /// * [useTintedInteraction]
  /// Defines if the theme uses tinted interaction effects.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useTintedDisable]
  /// Defines if the theme uses tinted disabled color.
  ///
  /// If undefined, defaults to false.
  ///
  /// * [useMaterial3]
  /// A temporary flag used to disable Material-3 design and use legacy
  /// Material-2 design instead. Material-3 design is the default.
  /// Material-2 will be deprecated in Flutter.
  ///
  /// If set to true, the theme will use Material3 default styles when
  /// properties are undefined, if false defaults will use FlexColorScheme's
  /// own opinionated default values.
  ///
  /// The M2/M3 defaults will only be used for properties that are not
  /// defined, if defined they keep their defined values.
  ///
  /// If undefined, defaults to true.
  static ToggleButtonsThemeData toggleButtonsTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in colorScheme to use as the main
    /// base color for the [ToggleButtons].
    ///
    /// Always defines the background color for selected button, and
    /// it's onColor pair defines the foreground for selected button.
    ///
    /// If [unselectedSchemeColor] is not defined, [baseSchemeColor] is also
    /// used as foreground color for unselected buttons.
    ///
    /// If [borderSchemeColor] is not defined, then in M2 it is also used as
    /// color base for the border color, in M3 and undefined borderSchemeColor
    /// results in [ColorScheme.outline] color being used.
    ///
    /// If not defined, primary will be used.
    final SchemeColor? baseSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// foreground color for the selected [ToggleButtons].
    ///
    /// If not defined, contrast color pair to [baseSchemeColor] will be used,
    /// which for its default value is onPrimary.
    final SchemeColor? selectedForegroundSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the
    /// foreground color for unselected [ToggleButtons].
    ///
    /// If not defined, [baseSchemeColor] will be used as base.
    final SchemeColor? unselectedSchemeColor,

    /// Selects which color from the passed in colorScheme to use as the border
    /// color for the toggle buttons.
    ///
    /// If not defined, [baseSchemeColor] will be used as base in M2, in M3
    /// [ColorScheme.outline] will be the effective result.
    final SchemeColor? borderSchemeColor,

    /// The button corner radius.
    ///
    /// If not defined, defaults to [kButtonRadius] 40dp.
    ///
    /// This is not in M3 specification, but FlexColorScheme component
    /// sub-themes harmonizes [ToggleButtons] size
    /// and border radius with the other Material buttons.
    final double? radius,

    /// The width of the borders around the toggle buttons.
    ///
    /// In this design it uses the same default as outline thickness for
    /// selected outline button and input decorator.
    ///
    /// If null, defaults to [kThinBorderWidth] = 1.0, when
    /// [useMaterial3] is false, and to 1 when [useMaterial3] is true.
    final double? borderWidth,

    /// Minimum button size.
    ///
    /// If undefined, defaults to [kButtonMinSize] = Size(40, 40).
    final Size? minButtonSize,

    /// The default text style for [ToggleButtons.children].
    ///
    /// [TextStyle.color] will be ignored and substituted by [color],
    /// [selectedColor] or [disabledColor] depending on whether the buttons
    /// are active, selected, or disabled.
    final TextStyle? textStyle,

    /// VisualDensity for ToggleButtons.
    ///
    /// The ToggleButtons do not implement VisualDensity from theme, but we can
    /// pass in what we use in ThemeData and adjust its size accordingly.
    ///
    /// You should pass in the same visual density that you set on your
    /// Theme to the ToggleButtons to make them keep the same size as the
    /// main buttons.
    ///
    /// Defaults to null, that results in VisualDensity.adaptivePlatformDensity
    /// being used, which is same as null default in ThemeData.
    final VisualDensity? visualDensity,

    /// Defines if the theme uses tinted interaction effects.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedInteraction,

    /// Defines if the theme uses tinted disabled color.
    ///
    /// If undefined, defaults to false.
    final bool? useTintedDisable,

    /// A temporary flag used to disable Material-3 design and use legacy
    /// Material-2 design instead. Material-3 design is the default.
    /// Material-2 will be deprecated in Flutter.
    ///
    /// If set to true, the theme will use Material3 default styles when
    /// properties are undefined, if false defaults will use FlexColorScheme's
    /// own opinionated default values.
    ///
    /// The M2/M3 defaults will only be used for properties that are not
    /// defined, if defined they keep their defined values.
    ///
    /// If undefined, defaults to true.
    final bool? useMaterial3,
  }) =>
      _toggleButtonsTheme(
        colorScheme: colorScheme,
        baseSchemeColor: baseSchemeColor,
        selectedForegroundSchemeColor: selectedForegroundSchemeColor,
        unselectedSchemeColor: unselectedSchemeColor,
        borderSchemeColor: borderSchemeColor,
        radius: radius,
        borderWidth: borderWidth,
        minButtonSize: minButtonSize,
        textStyle: textStyle,
        visualDensity: visualDensity,
        useTintedInteraction: useTintedInteraction,
        useTintedDisable: useTintedDisable,
        useMaterial3: useMaterial3,
      );

  /// An opinionated [TooltipThemeData]
  ///
  /// The named parameters are:
  ///
  /// * [colorScheme]
  /// Typically the same [ColorScheme] that is also use for your [ThemeData].
  ///
  /// * [backgroundSchemeColor]
  /// Selects which color from the passed in [colorScheme] to use as
  /// dialog background color.
  ///
  /// All colors in the color scheme are not good choices, but some work well.
  ///
  /// If not defined, defaults to [SchemeColor.onSurface].
  ///
  /// * [backgroundColor]
  /// Background color of the tooltip.
  ///
  /// If backgroundSchemeColor is defined, it will be used instead.
  ///
  /// * [foregroundColor]
  /// Foreground color of the tooltip.
  ///
  /// If backgroundSchemeColor is defined, its SchemeColor pair will be
  /// used instead.
  ///
  /// * [backgroundAlpha]
  /// Alpha value for the background color.
  ///
  /// If not defined, defaults to 0xFF, fully opaque.
  ///
  /// * [borderRadius]
  /// The border radius of the tooltip.
  ///
  /// If not defined, defaults to 4 same as Flutter SDK default.
  /// FCS sets it to 8 by default when using sub-themes and
  /// passes it here.
  ///
  /// * [borderColor]
  /// The color of the tooltip border.
  ///
  /// If not defined, defaults to fully transparent.
  ///
  /// * [textStyle]
  /// The tooltip text style.
  ///
  /// If not defined defaults to bodyMedium, with effective foregroundColor.
  ///
  /// * [padding]
  /// The amount of space by which to inset the [Tooltip.child].
  ///
  /// On mobile,
  ///   defaults to 16.0 logical pixels horizontally and 4.0 vertically.
  /// On desktop,
  ///   defaults to 8.0 logical pixels horizontally and 4.0 vertically.
  ///
  /// * [margin]
  /// If provided, the amount of empty space to surround the [Tooltip].
  ///
  /// Defines the tooltip's outer [Container.margin]. By default, a
  /// long tooltip will span the width of its window. If long enough,
  /// a tooltip might also span the window's height. This property allows
  /// one to define how much space the tooltip must be inset from the edges
  /// of their display window.
  ///
  /// If this property is null, the default margin is 0.0 logical
  /// pixels on all sides.
  ///
  /// * [waitDuration]
  /// The length of time that a pointer must hover over a tooltip's widget
  /// before the tooltip will be shown.
  ///
  /// Defaults to 0 milliseconds (tooltips are shown immediately upon hover).
  ///
  /// * [showDuration]
  /// The length of time that the tooltip will be shown after a long press is
  /// released (if triggerMode is [TooltipTriggerMode.longPress]) or a tap is
  /// released (if triggerMode is [TooltipTriggerMode.tap]) or mouse pointer
  /// exits the widget.
  ///
  /// Defaults to 1.5 seconds for long press and tap released or 0.1 seconds
  /// for mouse pointer exits the widget.
  static TooltipThemeData tooltipTheme({
    /// Typically the same [ColorScheme] that is also use for your [ThemeData].
    required final ColorScheme colorScheme,

    /// Selects which color from the passed in [colorScheme] to use as
    /// dialog background color.
    ///
    /// All colors in the color scheme are not good choices, but some work well.
    ///
    /// If not defined, defaults to [SchemeColor.onSurface].
    ///
    final SchemeColor? backgroundSchemeColor,

    /// Background color of the tooltip.
    ///
    /// If backgroundSchemeColor is defined, it will be used instead.
    final Color? backgroundColor,

    /// Foreground color of the tooltip.
    ///
    /// If backgroundSchemeColor is defined, its SchemeColor pair will be
    /// used instead.
    final Color? foregroundColor,

    /// Alpha value for the background color.
    ///
    /// If not defined, defaults to 0xFF, fully opaque.
    final int? backgroundAlpha,

    /// The border radius of the tooltip.
    ///
    /// If not defined, defaults to 4 same as Flutter SDK default.
    /// FCS sets it to 8 by default when using sub-themes and
    /// passes it here.
    final double? borderRadius,

    /// The color of the tooltip border.
    ///
    /// If not defined, defaults to fully transparent.
    final Color? borderColor,

    /// The tooltip text style.
    ///
    /// If not defined defaults to bodyMedium, with effective foregroundColor.
    final TextStyle? textStyle,

    /// The amount of space by which to inset the tooltip's [child].
    ///
    /// On mobile,
    ///   defaults to 16.0 logical pixels horizontally and 4.0 vertically.
    /// On desktop,
    ///   defaults to 8.0 logical pixels horizontally and 4.0 vertically.
    final EdgeInsetsGeometry? padding,

    /// If provided, the amount of empty space to surround the [Tooltip].
    ///
    /// Defines the tooltip's outer [Container.margin]. By default, a
    /// long tooltip will span the width of its window. If long enough,
    /// a tooltip might also span the window's height. This property allows
    /// one to define how much space the tooltip must be inset from the edges
    /// of their display window.
    ///
    /// If this property is null, the default margin is 0.0 logical
    /// pixels on all sides.
    final EdgeInsetsGeometry? margin,

    /// The length of time that a pointer must hover over a tooltip's widget
    /// before the tooltip will be shown.
    ///
    /// Defaults to 0 milliseconds (tooltips are shown immediately upon hover).
    final Duration? waitDuration,

    /// The length of time that the tooltip will be shown after a long press is
    /// released (if triggerMode is [TooltipTriggerMode.longPress]) or a tap is
    /// released (if triggerMode is [TooltipTriggerMode.tap]) or mouse pointer
    /// exits the widget.
    ///
    /// Defaults to 1.5 seconds for long press and tap released or 0.1 seconds
    /// for mouse pointer exits the widget.
    final Duration? showDuration,
  }) =>
      _tooltipTheme(
        colorScheme: colorScheme,
        backgroundSchemeColor: backgroundSchemeColor,
        backgroundColor: backgroundColor,
        foregroundColor: foregroundColor,
        backgroundAlpha: backgroundAlpha,
        borderRadius: borderRadius,
        borderColor: borderColor,
        textStyle: textStyle,
        padding: padding,
        margin: margin,
        waitDuration: waitDuration,
        showDuration: showDuration,
      );

  /// Deprecated, use [bottomNavigationBarTheme] instead.
  @Deprecated(
    'Use FlexSubThemes.bottomNavigationBarTheme instead. This '
    'function has been renamed to use the correct name that all other '
    'component theme helpers use, ending with "Theme". This deprecated '
    'pass-through version will be removed in FlexColorScheme 9.0.0.',
  )
  static BottomNavigationBarThemeData bottomNavigationBar({
    required final ColorScheme colorScheme,
    final TextStyle? labelTextStyle,
    final double? selectedLabelSize,
    final double? unselectedLabelSize,
    final SchemeColor? selectedLabelSchemeColor,
    final SchemeColor? unselectedLabelSchemeColor,
    final bool? mutedUnselectedLabel,
    final double? selectedIconSize,
    final double? unselectedIconSize,
    final SchemeColor? selectedIconSchemeColor,
    final SchemeColor? unselectedIconSchemeColor,
    final bool? mutedUnselectedIcon,
    final SchemeColor? backgroundSchemeColor,
    final double? opacity,
    final double? elevation,
    final bool? showSelectedLabels,
    final bool? showUnselectedLabels,
    final BottomNavigationBarType? type,
    final BottomNavigationBarLandscapeLayout? landscapeLayout,
    final int unselectedAlphaBlend = kUnselectedBackgroundPrimaryAlphaBlend,
    final int unselectedAlpha = kUnselectedAlphaBlend,
    final bool? useFlutterDefaults,
  }) =>
      _bottomNavigationBarTheme(
        colorScheme: colorScheme,
        labelTextStyle: labelTextStyle,
        selectedLabelSize: selectedLabelSize,
        unselectedLabelSize: unselectedLabelSize,
        selectedLabelSchemeColor: selectedLabelSchemeColor,
        unselectedLabelSchemeColor: unselectedLabelSchemeColor,
        mutedUnselectedLabel: mutedUnselectedLabel,
        selectedIconSize: selectedIconSize,
        unselectedIconSize: unselectedIconSize,
        selectedIconSchemeColor: selectedIconSchemeColor,
        unselectedIconSchemeColor: unselectedIconSchemeColor,
        mutedUnselectedIcon: mutedUnselectedIcon,
        backgroundSchemeColor: backgroundSchemeColor,
        opacity: opacity,
        elevation: elevation,
        showSelectedLabels: showSelectedLabels,
        showUnselectedLabels: showUnselectedLabels,
        type: type,
        landscapeLayout: landscapeLayout,
        unselectedAlphaBlend: unselectedAlphaBlend,
        unselectedAlpha: unselectedAlpha,
        useFlutterDefaults: useFlutterDefaults,
      );
}
